Sync with latest bnd code
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1363322 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java b/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
index 989fdc9..a452c9f 100644
--- a/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
@@ -9,6 +9,7 @@
import aQute.bnd.osgi.*;
import aQute.bnd.osgi.Clazz.MethodDef;
import aQute.bnd.osgi.Descriptors.TypeRef;
+import aQute.bnd.version.*;
import aQute.lib.collections.*;
/**
@@ -26,7 +27,7 @@
public class AnnotationReader extends ClassDataCollector {
final static TypeRef[] EMPTY = new TypeRef[0];
final static Pattern PROPERTY_PATTERN = Pattern
- .compile("\\s*([^=]+(\\s*:\\s*(Boolean|Byte|Char|Short|Integer|Long|Float|Double|String))?)\\s*=(.*)");
+ .compile("\\s*([^=\\s:]+)\\s*(?::\\s*(Boolean|Byte|Char|Short|Integer|Long|Float|Double|String)\\s*)?=(.*)");
public static final Version V1_1 = new Version("1.1.0"); // "1.1.0"
public static final Version V1_2 = new Version("1.2.0"); // "1.1.0"
@@ -308,7 +309,11 @@
if (m.matches()) {
String key = m.group(1);
- String value = m.group(4);
+ String type = m.group(2);
+ if ( type != null)
+ key += ":" + type;
+
+ String value = m.group(3);
component.property.add(key, value);
} else
throw new IllegalArgumentException("Malformed property '" + p + "' on component: " + className);