camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-8804: Fixed NPE in rest swagger reader.
Date Wed, 27 May 2015 16:55:40 GMT
Repository: camel
Updated Branches:
  refs/heads/master dcd149bb7 -> c936be321


CAMEL-8804: Fixed NPE in rest swagger reader.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c936be32
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c936be32
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c936be32

Branch: refs/heads/master
Commit: c936be321975ed80e8d14fa7647eb961bdd9c2bd
Parents: dcd149b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed May 27 18:57:42 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed May 27 18:57:42 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/swagger/RestSwaggerReader.scala   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c936be32/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerReader.scala
----------------------------------------------------------------------
diff --git a/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerReader.scala
b/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerReader.scala
index 88d3eea..9c0fadd 100644
--- a/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerReader.scala
+++ b/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerReader.scala
@@ -186,8 +186,8 @@ class RestSwaggerReader {
         param.getName,
         Some( param.getDescription ),
         Some( param.getDefaultValue),
-        param.getRequired.booleanValue(),
-        param.getAllowMultiple.booleanValue(),
+        if (param.getRequired != null) param.getRequired.booleanValue() else false,
+        if (param.getAllowMultiple != null) param.getAllowMultiple.booleanValue() else false,
         param.getDataType,
         allowValues,
         param.getParamType.toString,


Mime
View raw message