From 131cb46f6109a6099a445cb8e1b12ff5b68ae6de Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 1 Feb 2018 16:57:00 -0500 Subject: Upgrade sli/core to Nitrogen Use Apache derby for dblib SingleFeatureTest Change-Id: I6b41f7ede1a98b33824fceea9100e75c1ce8dda4 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney Generalization of CCSDK core/utils framework Changes made: * Created generalized version of core/utils/dblib as core/utils/common * Deprecated core/utils/dblib package Change-Id: I0992c43910278fbe254674d1e39d7e4fcad0a592 Issue-ID: CCSDK-168 Signed-off-by: Rich Tabedzki Use Apache derby for dblib test Use Apache derby for dblib SingleFeatureTest Change-Id: Ie497557f162e203fa5c5c82c17ddc55ba0c11b38 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney --- .../main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'utils/provider/src/main/java') 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 8da9b7ef..cc164d04 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 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(); -- cgit 1.2.3-korg