Permalink
Browse files

Fixed [Issue-10]

  • Loading branch information...
1 parent 10abeb0 commit 3d5c0babbdbe8b1f665d816389fabc79dea85c45 @tatu-at-salesforce tatu-at-salesforce committed Apr 23, 2012
@@ -8,9 +8,11 @@ Description:
Fixes:
-* Changed 'jaxrs-311' dependeny from 'compile' to 'provided'
+* Changed 'jaxrs-311' dependency from 'compile' to 'provided'
* SPI (META-INF/services/) fixed so auto-registration should now work
(contributed by Simone T)
+* Issue-10: NPE in EndpointConfig, if JAX-RS container passes null
+ set of Annotations to writeTo()
------------------------------------------------------------------------
=== History: ===
@@ -68,7 +68,8 @@ public static EndpointConfig forWriting(ObjectMapper mapper, Annotation[] annota
protected EndpointConfig add(Annotation[] annotations, boolean forWriting)
{
- for (Annotation annotation : annotations) {
+ if (annotations != null) {
+ for (Annotation annotation : annotations) {
Class<?> type = annotation.annotationType();
if (type == JSONP.class) {
if (forWriting) {
@@ -98,7 +99,8 @@ protected EndpointConfig add(Annotation[] annotations, boolean forWriting)
add(type.getAnnotations(), forWriting);
}
}
- }
+ }
+ }
return this;
}

0 comments on commit 3d5c0ba

Please sign in to comment.