Fix FELIX-1938
Change the error message when a event subscriber use a data-type but not a data-key.



git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@890035 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java b/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
index e94d640..376df3e 100644
--- a/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
+++ b/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
@@ -166,7 +166,14 @@
         if (t == null) { // Alternative configuration
             t = subscriber.getAttribute("data_type");
         }
+        
         if (t != null) {
+            // Check that the data-key attribute is set.
+            if (m_dataKey == null) {
+                throw new ConfigurationException(
+                        "Missing attribute in component configuration : "
+                                + DATA_KEY_ATTRIBUTE);
+            }
             Class type;
             try {
                 type = m_bundleContext.getBundle().loadClass(t);