commit | 01e7ebb095df86dbc812a092b3e42a2c04eca03d | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Thu Oct 07 07:18:01 2010 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Thu Oct 07 07:18:01 2010 +0000 |
tree | c8d882283aa27bff3606216d28053836fa3cbaf4 | |
parent | 2842962a78d84545cbec4206c7bfc66fc981b334 [diff] |
FELIX-2615 : ArrayOutOfBoundsException occurs from maven scr plugin when an empty class is present - applied patch from Tharindu Mathew git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1005343 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/JavaClassDescriptorManager.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/JavaClassDescriptorManager.java index 62b9385..f6e737a 100644 --- a/scrplugin/src/main/java/org/apache/felix/scrplugin/JavaClassDescriptorManager.java +++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/JavaClassDescriptorManager.java
@@ -270,6 +270,10 @@ final List<JavaClass> classes = new ArrayList<JavaClass>(); for ( int i = 0; i < sources.length; i++ ) { + if (sources[i].getClasses() == null || sources[i].getClasses().length == 0) + { + continue; + } for ( int j = 0; j < sources[i].getClasses().length; j++ ) { final JavaClass clazz = sources[i].getClasses()[j];