FELIX-3550 : Reimplement the SCR Generator
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1355242 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java
index f36420c..f2dcebc 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/ClassScanner.java
@@ -397,7 +397,13 @@
final List<ClassDescription> c = this.parseServiceComponentDescriptor( scrInfoFile, artifact.toString() + ':' + ABSTRACT_DESCRIPTOR_ARCHIV_PATH);
if ( c != null ) {
for(final ClassDescription cd : c) {
- loadedDependencies.put(cd.getDescribedClass().getName(), cd);
+ final String name;
+ if ( cd.getDescribedClass() == null ) {
+ name = cd.getDescription(ComponentDescription.class).getName();
+ } else {
+ name = cd.getDescribedClass().getName();
+ }
+ loadedDependencies.put(name, cd);
}
}
continue;
@@ -426,7 +432,13 @@
final List<ClassDescription> c = this.readServiceComponentDescriptor( artifact, entry );
if ( c != null ) {
for(final ClassDescription cd : c) {
- loadedDependencies.put(cd.getDescribedClass().getName(), cd);
+ final String name;
+ if ( cd.getDescribedClass() == null ) {
+ name = cd.getDescription(ComponentDescription.class).getName();
+ } else {
+ name = cd.getDescribedClass().getName();
+ }
+ loadedDependencies.put(name, cd);
}
}
}