FELIX-4010 : SCR Plugin aborts when scanning a Java 8 class file
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1526849 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/generator/changelog.txt b/scrplugin/generator/changelog.txt
index dbbc673..f3c0e76 100644
--- a/scrplugin/generator/changelog.txt
+++ b/scrplugin/generator/changelog.txt
@@ -2,7 +2,9 @@
---------------------------
** Bug
* [FELIX-4192] - SCR Generator fails with a NPE in case a class level Reference doesn't define a referenceInterface
+ * [FELIX-4010] - SCR Plugin aborts when scanning a Java 8 class file
+
Changes from 1.8.0 to 1.7.0
---------------------------
** Improvement
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 d716055..2eb7480 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
@@ -419,6 +419,10 @@
public ClassDescription getDescription(final Class<?> clazz)
throws SCRDescriptorException, SCRDescriptorFailureException {
final String name = clazz.getName();
+ // do don't need to scan classes in the java. or javax. package namespace
+ if ( name.startsWith("java.") || name.startsWith("javax.") ) {
+ return null;
+ }
ClassDescription result = this.allDescriptions.get(name);
if ( result == null ) {
// use scanner first
diff --git a/scrplugin/maven-scr-plugin/changelog.txt b/scrplugin/maven-scr-plugin/changelog.txt
index 10e07e4..a8b0e1a 100644
--- a/scrplugin/maven-scr-plugin/changelog.txt
+++ b/scrplugin/maven-scr-plugin/changelog.txt
@@ -2,6 +2,9 @@
-----------------------------
** Improvements
* [FELIX-4241] - Change default output directory for SCR annotations to ${project.build.directory}/classes
+** Bug
+ * [FELIX-4192] - SCR Generator fails with a NPE in case a class level Reference doesn't define a referenceInterface
+ * [FELIX-4010] - SCR Plugin aborts when scanning a Java 8 class file
Changes from 1.14.0 to 1.13.0
diff --git a/scrplugin/maven-scr-plugin/pom.xml b/scrplugin/maven-scr-plugin/pom.xml
index e306415..c0f0c55 100644
--- a/scrplugin/maven-scr-plugin/pom.xml
+++ b/scrplugin/maven-scr-plugin/pom.xml
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.generator</artifactId>
- <version>1.8.0</version>
+ <version>1.8.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/scrplugin/scrtask/changelog.txt b/scrplugin/scrtask/changelog.txt
index 3c39c44..99cebb8 100644
--- a/scrplugin/scrtask/changelog.txt
+++ b/scrplugin/scrtask/changelog.txt
@@ -1,3 +1,10 @@
+Changes from 1.9.0 to 1.8.0
+---------------------------
+** Bug
+ * [FELIX-4192] - SCR Generator fails with a NPE in case a class level Reference doesn't define a referenceInterface
+ * [FELIX-4010] - SCR Plugin aborts when scanning a Java 8 class file
+
+
Changes from 1.8.0 to 1.7.0
---------------------------
** Improvement
diff --git a/scrplugin/scrtask/pom.xml b/scrplugin/scrtask/pom.xml
index dfa460a..048ec16 100644
--- a/scrplugin/scrtask/pom.xml
+++ b/scrplugin/scrtask/pom.xml
@@ -54,7 +54,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.generator</artifactId>
- <version>1.8.0</version>
+ <version>1.8.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>