Bug:SubscriptionModelLoader.getFileContentAsString 04/133604/2
authoremaclee <lee.anjella.macabuhay@est.tech>
Thu, 9 Mar 2023 15:50:32 +0000 (15:50 +0000)
committerPriyank Maheshwari <priyank.maheshwari@est.tech>
Thu, 9 Mar 2023 16:09:41 +0000 (16:09 +0000)
Issue-ID: CPS-1537
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: Icc88a8bf40830853a208e79658f3c590185ad051

cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java

index 6713491..17413ba 100644 (file)
@@ -109,7 +109,7 @@ public class SubscriptionModelLoader implements ModelLoader {
     }
 
     private String getFileContentAsString() {
-        try (InputStream inputStream = ClassLoader.getSystemClassLoader()
+        try (InputStream inputStream = getClass().getClassLoader()
                 .getResourceAsStream("model/subscription.yang")) {
             return new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
         } catch (final Exception exception) {