summaryrefslogtreecommitdiffstats
path: root/utils/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'utils/provider/src')
-rwxr-xr-xutils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java b/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java
index 8da9b7ef0..cc164d042 100755
--- a/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java
+++ b/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,9 +54,11 @@ public class JREFileResolver implements PropertiesFileResolver {
*/
@Override
public Optional<File> resolveFile(final String filename) {
+
final Bundle bundle = FrameworkUtil.getBundle(this.clazz);
final File dataFile;
+
try {
if (bundle == null) {
return Optional.empty();
@@ -67,6 +69,7 @@ public class JREFileResolver implements PropertiesFileResolver {
return Optional.empty();
}
+
dataFile = bundle.getDataFile(filename);
if(dataFile.exists()) {
dataFile.delete();