servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject servicemix-bundles git commit: [SM-3342] swagger-jaxrs may throw NPE when non-default HTTP port is used with CXF
Date Tue, 09 May 2017 13:41:45 GMT
Repository: servicemix-bundles
Updated Branches:
  refs/heads/master dc7a55f63 -> 4ebd5e22f


[SM-3342] swagger-jaxrs may throw NPE when non-default HTTP port is used with CXF


Project: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/commit/4ebd5e22
Tree: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/tree/4ebd5e22
Diff: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/diff/4ebd5e22

Branch: refs/heads/master
Commit: 4ebd5e22f1cd3f88ac9fb4c8856e0efe0ff35224
Parents: dc7a55f
Author: Tadayoshi Sato <sato.tadayoshi@gmail.com>
Authored: Tue May 9 20:42:57 2017 +0900
Committer: Tadayoshi Sato <sato.tadayoshi@gmail.com>
Committed: Tue May 9 20:42:57 2017 +0900

----------------------------------------------------------------------
 pom.xml                                                   | 10 ++++++++++
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 .../com/wordnik/swagger/jaxrs/listing/ApiListing.scala    |  4 ++--
 11 files changed, 30 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f63874b..e4531dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,6 +112,16 @@
         <module>htmlunit-2.26</module>
         <module>saxon-9.7.0-18</module>
         <module>json4s_2.11-3.5.1</module>
+        <module>swagger-jaxrs-1.3.2</module>
+        <module>swagger-jaxrs-1.3.4</module>
+        <module>swagger-jaxrs-1.3.5</module>
+        <module>swagger-jaxrs-1.3.7</module>
+        <module>swagger-jaxrs-1.3.8</module>
+        <module>swagger-jaxrs-1.3.10</module>
+        <module>swagger-jaxrs-1.3.11</module>
+        <module>swagger-jaxrs-1.3.12</module>
+        <module>swagger-jaxrs-1.3.13</module>
+        <module>swagger-jaxrs_2.11-1.3.12</module>
     </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.10/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.10/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.10/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.10/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.10/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.11/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.11/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.11/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.11/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.11/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.13/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.13/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.13/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.13/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.13/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.2/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.2/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.2/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.2/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.2/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.4/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.4/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.4/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.4/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.4/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.5/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.5/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.5/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.5/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.5/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.7/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.7/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.7/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.7/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.7/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs-1.3.8/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs-1.3.8/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs-1.3.8/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs-1.3.8/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs-1.3.8/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/4ebd5e22/swagger-jaxrs_2.11-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
----------------------------------------------------------------------
diff --git a/swagger-jaxrs_2.11-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
b/swagger-jaxrs_2.11-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
index dd7c6d0..4506ec1 100644
--- a/swagger-jaxrs_2.11-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
+++ b/swagger-jaxrs_2.11-1.3.12/src/main/scala/com/wordnik/swagger/jaxrs/listing/ApiListing.scala
@@ -35,7 +35,7 @@ object ApiListingCache {
   var caches: java.util.Map[Object, Option[Map[String, ApiListing]]] = new HashMap[Object,
Option[Map[String, ApiListing]]]
 
   def listing(docRoot: String, app: Application, sc: ServletConfig): Option[Map[String, ApiListing]]
= {
-    val scanner = sc.getServletContext().getAttribute("SCANNER")
+    val scanner = Option(sc).map(_.getServletContext().getAttribute("SCANNER")).orNull
     if (scanner != null) {
         _cache = caches.get(scanner)
     }
@@ -173,4 +173,4 @@ class ApiListingResource {
   def headersToMap(headers: HttpHeaders): Map[String, List[String]] = {
     (for((key, values) <- headers.getRequestHeaders.asScala) yield (key, values.asScala.toList)).toMap
   }
-}
\ No newline at end of file
+}


Mime
View raw message