commit | c91ddad9345c196874c3660cfeb2570c0faa2d87 | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Wed Oct 24 15:20:37 2007 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Wed Oct 24 15:20:37 2007 +0000 |
tree | a97f862e24d95f791e1354237c14f439937f020b | |
parent | faa3d61517152f3aa59464b6d59569db5a49080a [diff] |
Fix FELIX-409 and fail building if an empty @scr.service tag is specified without the component implementing an interface. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@587906 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Component.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Component.java index b374cc9..76591a7 100644 --- a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Component.java +++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Component.java
@@ -226,6 +226,9 @@ // verify service boolean isServiceFactory = false; if (this.getService() != null) { + if ( this.getService().getInterfaces().size() == 0 ) { + issues.add(this.getMessage("Service interface information is missing for @scr.service tag")); + } this.getService().validate(issues, warnings); isServiceFactory = Boolean.valueOf(this.getService().getServicefactory()).booleanValue(); }
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Service.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Service.java index 12fcf83..0076ba7 100644 --- a/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Service.java +++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/om/Service.java
@@ -48,7 +48,7 @@ public void setServicefactory(String servicefactory) { this.servicefactory = servicefactory; } - + public void setServicefactory(boolean servicefactory) { this.servicefactory = String.valueOf(servicefactory); }