From 37f851ed3531f7658fb8a1d7c39609f14a83ecef Mon Sep 17 00:00:00 2001 From: HuabingZhao Date: Fri, 19 Jan 2018 13:10:54 +0000 Subject: Fix Nexus-IQ security issues update dependency libs Issue-ID: MSB-129 Change-Id: Ibfaf15b9690accc1ecabfa92c78ca1cc2c1372bc Signed-off-by: HuabingZhao --- .../src/main/java/org/onap/msb/apiroute/ApiRouteApp.java | 7 +++++-- .../src/main/java/org/onap/msb/apiroute/wrapper/util/Jackson.java | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apiroute/apiroute-service/src/main') 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 { @@ -111,13 +112,15 @@ public class ApiRouteApp extends Application { config.setResourcePackage("org.onap.msb.apiroute.resources"); SimpleServerFactory simpleServerFactory = (SimpleServerFactory) configuration.getServerFactory(); String basePath = simpleServerFactory.getApplicationContextPath(); - String rootPath = simpleServerFactory.getJerseyRootPath(); + Optional 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; } -- cgit 1.2.3-korg