Latest bnd code
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1350613 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java b/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java
index 46f9e94..3e00c76 100755
--- a/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java
+++ b/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java
@@ -9,9 +9,8 @@
char start = '[';
char end = ']';
- static Pattern RANGE = Pattern.compile("(\\(|\\[)\\s*(" +
- Version.VERSION_STRING + ")\\s*,\\s*(" +
- Version.VERSION_STRING + ")\\s*(\\)|\\])");
+ static Pattern RANGE = Pattern.compile("(\\(|\\[)\\s*(" + Version.VERSION_STRING + ")\\s*,\\s*("
+ + Version.VERSION_STRING + ")\\s*(\\)|\\])");
public VersionRange(String string) {
string = string.trim();
@@ -24,9 +23,7 @@
high = new Version(v2);
end = m.group(18).charAt(0);
if (low.compareTo(high) > 0)
- throw new IllegalArgumentException(
- "Low Range is higher than High Range: " + low + "-" +
- high);
+ throw new IllegalArgumentException("Low Range is higher than High Range: " + low + "-" + high);
} else
high = low = new Version(string);
@@ -66,8 +63,8 @@
}
public boolean includes(Version v) {
- if ( !isRange() ) {
- return low.compareTo(v) <=0;
+ if (!isRange()) {
+ return low.compareTo(v) <= 0;
}
if (includeLow()) {
if (v.compareTo(low) < 0)
@@ -80,17 +77,17 @@
return false;
} else if (v.compareTo(high) >= 0)
return false;
-
+
return true;
}
-
- public Iterable<Version> filter( final Iterable<Version> versions) {
+
+ public Iterable<Version> filter(final Iterable<Version> versions) {
List<Version> list = new ArrayList<Version>();
- for ( Version v : versions) {
- if ( includes(v))
+ for (Version v : versions) {
+ if (includes(v))
list.add(v);
}
return list;
}
-
+
}
\ No newline at end of file