summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2011-10-10 05:01:11 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2011-10-10 05:01:11 +0000
commitfc7cb9fac15928f69dc89adbadd4ef24c1cc3340 (patch)
treee9861fd96cc759ba62d3675026cdf4ab3373a1f4 /sca-java-2.x/trunk/modules
parent7eafc42e6b7b01d9dfd8d7f4f1e68969d3ace806 (diff)
Avoid NPE
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1180781 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
index 1dfdf17345..7d6d1adbec 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/DataBindingJAXRSProvider.java
@@ -61,6 +61,9 @@ public abstract class DataBindingJAXRSProvider {
}
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);