You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2013/02/05 06:19:04 UTC

svn commit: r1442475 - /felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java

Author: cziegeler
Date: Tue Feb  5 05:19:04 2013
New Revision: 1442475

URL: http://svn.apache.org/viewvc?rev=1442475&view=rev
Log:
FELIX-3886 :  ClassNotFound for empty *.java-File 

Modified:
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java?rev=1442475&r1=1442474&r2=1442475&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java (original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java Tue Feb  5 05:19:04 2013
@@ -88,7 +88,7 @@ public class ClassScanner {
     /** Source for all generated descriptions. */
     private static final String GENERATED = "<generated>";
 
-    /** With this syntax array pameters names are returned by reflection API */
+    /** With this syntax array parameters names are returned by reflection API */
     private static final Pattern ARRAY_PARAM_TYPE_NAME = Pattern.compile("^\\[L(.*);$");
 
     /** Component descriptions loaded from dependencies*/
@@ -129,7 +129,7 @@ public class ClassScanner {
      * Scan all source class files for annotations and process them.
      */
     public List<ClassDescription> scanSources()
-            throws SCRDescriptorException, SCRDescriptorFailureException {
+            throws SCRDescriptorFailureException, SCRDescriptorException {
         final List<ClassDescription> result = new ArrayList<ClassDescription>();
 
         for (final Source src : project.getSources()) {
@@ -145,7 +145,7 @@ public class ClassScanner {
 
                 this.process(annotatedClass, src, result);
             } catch (final ClassNotFoundException cnfe) {
-                throw new SCRDescriptorFailureException("Unable to load compiled class: " + src.getClassName(), cnfe);
+                throw new SCRDescriptorException("Unable to load compiled class: " + src.getClassName(), src.getFile().toString(), cnfe);
             }
         }
         return result;
@@ -216,7 +216,7 @@ public class ClassScanner {
                 return desc;
             }
         } catch (final IOException ioe) {
-            throw new SCRDescriptorFailureException("Unable to scan class files: " + annotatedClass.getName(), ioe);
+            throw new SCRDescriptorException("Unable to scan class files: " + annotatedClass.getName(), location, ioe);
         }
         return null;
     }