Configure the RAT plugin for the webconsole-plugin project
Add a test about a potential NPE in the Annotation Collector.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1055816 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MetadataCollector.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MetadataCollector.java
index 7c54269..6527355 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MetadataCollector.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MetadataCollector.java
@@ -219,11 +219,16 @@
*/
public void visitEnd() {
// If m_elem (Component) is null, print a warning and ignore.
- if (m_elem == null && ! m_elements.isEmpty()) {
+ if (m_elem == null && ! m_elements.isEmpty()) {
m_ignoredBecauseOfMissingComponent = true;
return;
}
+ if (! m_containsComponentAnnotation) {
+ m_ignoredBecauseOfMissingComponent = true;
+ return;
+ }
+
// Recompute the tree
Set elems = getElements().keySet();
Iterator it = elems.iterator();
diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/error/AbstractClass.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/error/AbstractClass.java
new file mode 100644
index 0000000..4cc792c
--- /dev/null
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/error/AbstractClass.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.test.scenarios.component.error;
+
+import org.apache.felix.ipojo.annotations.Requires;
+
+public abstract class AbstractClass {
+
+ @Requires
+ private Runnable run;
+
+}
diff --git a/ipojo/webconsole-plugin/pom.xml b/ipojo/webconsole-plugin/pom.xml
index 83a6e56..4a38604 100644
--- a/ipojo/webconsole-plugin/pom.xml
+++ b/ipojo/webconsole-plugin/pom.xml
@@ -28,7 +28,7 @@
<artifactId>org.apache.felix.ipojo.webconsole</artifactId>
<version>1.5.0-SNAPSHOT</version>
<name>Apache Felix iPOJO WebConsole Plugins</name>
-
+
<description>
iPOJO plugin for the Apache Felix Web Console. This plugin allows introspecting an iPOJO system with the Apache Felix
Web Console.
@@ -61,7 +61,7 @@
org.apache.felix.ipojo.webconsole
</Private-Package>
<Import-Package>*</Import-Package>
- <Include-Resource>
+ <Include-Resource>
META-INF/LICENSE=LICENSE,
META-INF/LICENSE.json=LICENSE.json,
META-INF/NOTICE=NOTICE,
@@ -99,7 +99,8 @@
<param>maven-eclipse.xml</param>
<param>.checkstyle</param>
<param>.externalToolBuilders/*</param>
- <param>LICENSE.asm</param>
+ <param>LICENSE.*</param>
+ <param>DEPENDENCIES</param>
</excludes>
</configuration>
</plugin>
@@ -118,17 +119,17 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
- <version>3.1.0</version>
+ <version>3.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo</artifactId>
- <version>1.6.2</version>
+ <version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo.annotations</artifactId>
- <version>1.6.2</version>
+ <version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>