tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r1180781 - /tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
Date Mon, 10 Oct 2011 05:01:11 GMT
Author: rfeng
Date: Mon Oct 10 05:01:11 2011
New Revision: 1180781

URL: http://svn.apache.org/viewvc?rev=1180781&view=rev
Log:
Avoid NPE

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java?rev=1180781&r1=1180780&r2=1180781&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
Mon Oct 10 05:01:11 2011
@@ -61,6 +61,9 @@ public abstract class DataBindingJAXRSPr
     }
 
     protected <A extends Annotation> A getAnnotation(Annotation[] annotations, Class<A>
type) {
+        if(annotations == null) {
+            return null;
+        }
         for (Annotation a : annotations) {
             if (a.annotationType() == type) {
                 return type.cast(a);



Mime
View raw message