geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r516783 - /geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java
Date Sat, 10 Mar 2007 20:54:07 GMT
Author: jgenender
Date: Sat Mar 10 12:54:07 2007
New Revision: 516783

URL: http://svn.apache.org/viewvc?view=rev&rev=516783
Log:
Place null guard for serviceRefs

Modified:
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java

Modified: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java?view=diff&rev=516783&r1=516782&r2=516783
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java
(original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/WebServiceRefAnnotationHelper.java
Sat Mar 10 12:54:07 2007
@@ -257,15 +257,17 @@
         //------------------------------------------------------------------------------------------
         boolean exists = false;
         ServiceRefType[] serviceRefs = annotatedApp.getServiceRefArray();
-        for ( ServiceRefType serviceRef : serviceRefs ) {
-            if ( serviceRef.getServiceRefName().getStringValue().trim().equals(webServiceRefName)
) {
-                if (method != null || field != null) {
-                    InjectionTargetType[] targets = serviceRef.getInjectionTargetArray();
-                    if (!hasTarget(method, field, targets)) {
-                        configureInjectionTarget(serviceRef.addNewInjectionTarget(), method,
field);
+        if (serviceRefs != null){
+            for ( ServiceRefType serviceRef : serviceRefs ) {
+                if ( serviceRef.getServiceRefName().getStringValue().trim().equals(webServiceRefName)
) {
+                    if (method != null || field != null) {
+                        InjectionTargetType[] targets = serviceRef.getInjectionTargetArray();
+                        if (!hasTarget(method, field, targets)) {
+                            configureInjectionTarget(serviceRef.addNewInjectionTarget(),
method, field);
+                        }
                     }
+                    return;
                 }
-                return;
             }
         }
         if ( !exists ) {



Mime
View raw message