Corrected Resource location for Stub 49/138749/1
authormpriyank <priyank.maheshwari@est.tech>
Wed, 14 Aug 2024 14:52:01 +0000 (15:52 +0100)
committermpriyank <priyank.maheshwari@est.tech>
Wed, 14 Aug 2024 14:52:05 +0000 (15:52 +0100)
- eliminate nullpointerexception from the DMI Stub logs

Issue-ID: CPS-2313
Change-Id: Iccfce28b3ccacb55b14a16525dcc621b4e1ae675
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java
dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/data/ietf-network-topology-sample-rfc8345.json [moved from dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/data.operational/ietf-network-topology-sample-rfc8345.json with 100% similarity]

index 5021ae7..e06c528 100644 (file)
@@ -225,7 +225,7 @@ public class DmiRestStubController {
         log.info("Logging request body {}", requestBody);
 
         final String sampleJson = ResourceFileReaderUtil.getResourceFileContent(applicationContext.getResource(
-                ResourceLoader.CLASSPATH_URL_PREFIX + "data/operational/ietf-network-topology-sample-rfc8345.json"));
+                ResourceLoader.CLASSPATH_URL_PREFIX + "data/ietf-network-topology-sample-rfc8345.json"));
         return ResponseEntity.ok(sampleJson);
     }
 
@@ -347,7 +347,7 @@ public class DmiRestStubController {
         response.setOptions(dataOperationRequest.getOptions());
         final String ietfNetworkTopologySample = ResourceFileReaderUtil.getResourceFileContent(
                 applicationContext.getResource(ResourceLoader.CLASSPATH_URL_PREFIX
-                        + "data/operational/ietf-network-topology-sample-rfc8345.json"));
+                        + "data/ietf-network-topology-sample-rfc8345.json"));
         final JSONParser jsonParser = new JSONParser();
         try {
             response.setResult(jsonParser.parse(ietfNetworkTopologySample));