commit | 75768da36b0e48f1f9562f7e6802c9d54dfaec5c | [log] [tgz] |
---|---|---|
author | David Jencks <djencks@apache.org> | Sun Jun 15 01:09:50 2014 +0000 |
committer | David Jencks <djencks@apache.org> | Sun Jun 15 01:09:50 2014 +0000 |
tree | 3d032964a4a04e3ed31ecc1f7edb1fd509c59141 | |
parent | 339ad7fd8162621cc5bc2b7e60d292e45eae7697 [diff] |
FELIX-4406 fail validation with null provide git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1602639 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java index 7c6f62c..62f7319 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ServiceMetadata.java
@@ -102,6 +102,14 @@ throw componentMetadata .validationFailure( "At least one provided interface must be declared in the service element" ); } + for ( String provide: m_provides ) + { + if ( provide == null ) + { + throw componentMetadata + .validationFailure( "Null provides. Possibly service is not specified as value of attribute 'interface'" ); + } + } if (m_serviceFactory != null) { if (componentMetadata.getNamespaceCode() >= XmlHandler.DS_VERSION_1_3)