diff options
author | HuabingZhao <zhao.huabing@zte.com.cn> | 2018-01-19 13:10:54 +0000 |
---|---|---|
committer | HuabingZhao <zhao.huabing@zte.com.cn> | 2018-01-19 13:11:00 +0000 |
commit | 37f851ed3531f7658fb8a1d7c39609f14a83ecef (patch) | |
tree | 7f70d119b10a8f51033dc392118c4c26dfc59eb4 /apiroute/apiroute-service/src | |
parent | 5f773507956a7d9eda7d50fba04403169a2a9ed6 (diff) |
Fix Nexus-IQ security issues
update dependency libs
Issue-ID: MSB-129
Change-Id: Ibfaf15b9690accc1ecabfa92c78ca1cc2c1372bc
Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'apiroute/apiroute-service/src')
-rw-r--r-- | apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/ApiRouteApp.java | 7 | ||||
-rw-r--r-- | apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/ApiRouteApp.java b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/ApiRouteApp.java index fb8147d..697351a 100644 --- a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/ApiRouteApp.java +++ b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/ApiRouteApp.java @@ -32,6 +32,7 @@ import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.Environment; import io.swagger.jaxrs.config.BeanConfig; import io.swagger.jaxrs.listing.ApiListingResource; +import java.util.Optional; public class ApiRouteApp extends Application<ApiRouteAppConfig> { @@ -111,13 +112,15 @@ public class ApiRouteApp extends Application<ApiRouteAppConfig> { config.setResourcePackage("org.onap.msb.apiroute.resources"); SimpleServerFactory simpleServerFactory = (SimpleServerFactory) configuration.getServerFactory(); String basePath = simpleServerFactory.getApplicationContextPath(); - String rootPath = simpleServerFactory.getJerseyRootPath(); + Optional<String> optRootPath = simpleServerFactory.getJerseyRootPath(); + + String rootPath = optRootPath.get(); rootPath = rootPath.substring(0, rootPath.indexOf("/*")); basePath = basePath.equals("/") ? rootPath : (new StringBuilder()).append(basePath).append(rootPath).toString(); - LOGGER.warn("getApplicationContextPath: " + basePath); + LOGGER.info("getApplicationContextPath: " + basePath); config.setBasePath(basePath); config.setScan(true); } diff --git a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java index 85c1e3a..1e5abd1 100644 --- a/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java +++ b/apiroute/apiroute-service/src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java @@ -9,13 +9,11 @@ * 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. See the License for the specific language governing permissions and limitations under - * the License. ******************************************************************************/ package org.onap.msb.apiroute.wrapper.util; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.guava.GuavaModule; -import com.fasterxml.jackson.datatype.jdk7.Jdk7Module; import com.fasterxml.jackson.datatype.joda.JodaModule; public class Jackson { @@ -34,7 +32,6 @@ public class Jackson { private static ObjectMapper configure(ObjectMapper mapper) { mapper.registerModule(new GuavaModule()); mapper.registerModule(new JodaModule()); - mapper.registerModule(new Jdk7Module()); return mapper; } |