Fix Nexus IQ security issue 83/28383/1
authorHuabingZhao <zhao.huabing@zte.com.cn>
Wed, 17 Jan 2018 10:44:05 +0000 (10:44 +0000)
committerHuabingZhao <zhao.huabing@zte.com.cn>
Wed, 17 Jan 2018 10:49:04 +0000 (10:49 +0000)
Update dropwizard to the latest version.

Issue-ID: MSB-131
Change-Id: If67ca96262a1747a45416a562f2bbce522cbf18e
Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
sdclient/discovery-service/dependency-reduced-pom.xml
sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/DiscoverApp.java
sdclient/pom.xml

index cb2292a..f36f773 100644 (file)
@@ -3,13 +3,13 @@
   <parent>
     <artifactId>sdclient</artifactId>
     <groupId>org.onap.msb.discovery</groupId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.onap.msb.discovery.sdclient</groupId>
   <artifactId>discovery-service</artifactId>
   <name>onap/msb/discovery/sdclient/discovery-service</name>
-  <version>1.0.0-SNAPSHOT</version>
+  <version>1.0.1-SNAPSHOT</version>
   <build>
     <resources>
       <resource>
@@ -85,7 +85,7 @@
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-module-junit4</artifactId>
-      <version>1.5.5</version>
+      <version>1.6.6</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-api-mockito</artifactId>
-      <version>1.5.5</version>
+      <version>1.6.6</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>
-          <artifactId>mockito-all</artifactId>
+          <artifactId>mockito-core</artifactId>
           <groupId>org.mockito</groupId>
         </exclusion>
         <exclusion>
-          <artifactId>powermock-api-support</artifactId>
+          <artifactId>powermock-api-mockito-common</artifactId>
           <groupId>org.powermock</groupId>
         </exclusion>
+        <exclusion>
+          <artifactId>hamcrest-core</artifactId>
+          <groupId>org.hamcrest</groupId>
+        </exclusion>
       </exclusions>
     </dependency>
   </dependencies>
index 77c522e..5773377 100644 (file)
@@ -28,6 +28,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 DiscoverApp extends Application<DiscoverAppConfig> {
 
@@ -91,7 +92,10 @@ public class DiscoverApp extends Application<DiscoverAppConfig> {
         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("/*"));
 
index 783e74a..647e8c7 100644 (file)
 
 
                <!-- dependency version -->
-           <dropwizard.version>0.8.0</dropwizard.version>
+           <dropwizard.version>1.2.0</dropwizard.version>
            <swagger.version>1.5.3</swagger.version>
            <lombok.version>1.16.16</lombok.version>
            
            <jetty.version>9.2.9.v20150224</jetty.version>
-           <jackson-version>2.7.9</jackson-version>
+           <jackson-version>2.9.1</jackson-version>
            <jersey.version>2.16</jersey.version>
            <slf4j.version>1.7.12</slf4j.version>
            <logback.version>1.1.3</logback.version>
                        <dependency>
                                <groupId>com.fasterxml.jackson.core</groupId>
                                <artifactId>jackson-databind</artifactId>
-                               <version>2.7.9.1</version>
+                               <version>2.9.1</version>
                        </dependency>
                        <dependency>
                                <groupId>com.fasterxml.jackson.core</groupId>