FELIX-456: remove extraneous whitespace from version range before parsing

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@611148 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
index 920d67f..afc99fc 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
@@ -28,7 +28,7 @@
 	char start = '[';

 	char end = ']';

 

-	static String V = "[0-9]+(\\.[0-9]+(\\.[0-9]+(\\.[a-zA-Z0-9_-]+)?)?)?";

+	static String V = "\\s*[0-9]+(\\.[0-9]+(\\.[0-9]+(\\.[a-zA-Z0-9_-]+)?)?)?\\s*";

 	static Pattern RANGE = Pattern.compile("(\\(|\\[)(" + V + "),(" + V

 			+ ")(\\)|\\])");

 

@@ -37,8 +37,8 @@
 		Matcher m = RANGE.matcher(string);

 		if (m.matches()) {

 			start = m.group(1).charAt(0);

-			low = new Version(m.group(2));

-			high = new Version(m.group(6));

+			low = new Version(m.group(2).trim());

+			high = new Version(m.group(6).trim());

 			end = m.group(10).charAt(0);

 			if (low.compareTo(high) >= 0)

 				throw new IllegalArgumentException(