geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r447551 - /geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
Date Mon, 18 Sep 2006 20:58:48 GMT
Author: chirino
Date: Mon Sep 18 13:58:47 2006
New Revision: 447551

URL: http://svn.apache.org/viewvc?view=rev&rev=447551
Log:
Bug fix for: http://issues.apache.org/jira/browse/XBEAN-53

Modified:
    geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java

Modified: geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java?view=diff&rev=447551&r1=447550&r2=447551
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
Mon Sep 18 13:58:47 2006
@@ -144,14 +144,20 @@
         JavaSource[] javaSources = builder.getSources();
         List elements = new ArrayList();
         for (int i = 0; i < javaSources.length; i++) {
-            JavaClass javaClass = javaSources[i].getClasses()[0];
-
-            ElementMapping element = loadElement(javaClass);
-            if (element != null && !javaClass.isAbstract()) {
-                elements.add(element);
-            } else {
-                log.debug("No XML annotation found for type: " + javaClass.getFullyQualifiedName());
-            }
+        	if( javaSources[i].getClasses().length == 0 ) {
+                log.warn("No Java Classes defined in: " + javaSources[i].getURL() );
+        	} else {
+        		JavaClass[] classes = javaSources[i].getClasses();
+        		for (int j = 0; j < classes.length; j++) {
+    	            JavaClass javaClass = classes[j];    	        	
+    	            ElementMapping element = loadElement(javaClass);
+    	            if (element != null && !javaClass.isAbstract()) {
+    	                elements.add(element);
+    	            } else {
+    	                log.debug("No XML annotation found for type: " + javaClass.getFullyQualifiedName());
+    	            }					
+				}
+        	}
         }
         return elements;
     }



Mime
View raw message