FELIX-3518 - Update to EventAdmin Spec 1.3

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1383606 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/EventHandlerProxy.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/EventHandlerProxy.java
index ac0db05..d2be473 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/EventHandlerProxy.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/EventHandlerProxy.java
@@ -19,6 +19,7 @@
 package org.apache.felix.eventadmin.impl.handler;
 
 import java.util.Collection;
+import java.util.Iterator;
 
 import org.apache.felix.eventadmin.impl.security.PermissionsUtil;
 import org.apache.felix.eventadmin.impl.util.LogWrapper;
@@ -120,6 +121,33 @@
                 this.topics = values;
             }
         }
+        else if (topicObj instanceof Collection)
+        {
+            final Collection col = (Collection)topicObj;
+            final String[] values = new String[col.size()];
+            int index = 0;
+            // check if one value matches '*'
+            final Iterator i = col.iterator();
+            boolean matchAll = false;
+            while ( i.hasNext() )
+            {
+                final String v = i.next().toString();
+                values[index] = v;
+                index++;
+                if ( "*".equals(v) )
+                {
+                    matchAll = true;
+                }
+            }
+            if ( matchAll )
+            {
+                this.topics = null;
+            }
+            else
+            {
+                this.topics = values;
+            }
+        }
         else if ( topicObj == null && !this.handlerContext.requireTopic )
         {
             this.topics = null;