Fix code smell
[cps.git] / cps-ncmp-rest / src / main / java / org / onap / cps / ncmp / rest / controller / NetworkCmProxyController.java
old mode 100644 (file)
new mode 100755 (executable)
index fccfb71..3c8a04e
@@ -42,7 +42,6 @@ import org.springframework.web.bind.annotation.RestController;
 public class NetworkCmProxyController implements NetworkCmProxyApi {
 
     private static final Gson GSON = new GsonBuilder().create();
-    private static final String XPATH_ROOT = "/";
 
     @Autowired
     private NetworkCmProxyDataService networkCmProxyDataService;
@@ -57,12 +56,9 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
     @Override
     public ResponseEntity<Object> getNodeByCmHandleAndXpath(final String cmHandle, @Valid final String xpath,
         @Valid final Boolean includeDescendants) {
-        if (XPATH_ROOT.equals(xpath)) {
-            return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-        }
         final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
             ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS;
-        final DataNode dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption);
+        final var dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption);
         return new ResponseEntity<>(DataMapUtils.toDataMap(dataNode), HttpStatus.OK);
     }