aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1128818 - in /aries/branches/0.2-incubating-RCx: application/ application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/ util/ util/src/main/java/org/apache/aries/util/
Date Sun, 29 May 2011 04:36:27 GMT
Author: gawor
Date: Sun May 29 04:36:27 2011
New Revision: 1128818

URL: http://svn.apache.org/viewvc?rev=1128818&view=rev
Log:
ARIES-667: OBRAriesResolver can return bundle information for bundles with higher version
than expected

Modified:
    aries/branches/0.2-incubating-RCx/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
    aries/branches/0.2-incubating-RCx/application/pom.xml
    aries/branches/0.2-incubating-RCx/util/pom.xml
    aries/branches/0.2-incubating-RCx/util/src/main/java/org/apache/aries/util/VersionRange.java

Modified: aries/branches/0.2-incubating-RCx/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
URL: http://svn.apache.org/viewvc/aries/branches/0.2-incubating-RCx/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java?rev=1128818&r1=1128817&r2=1128818&view=diff
==============================================================================
--- aries/branches/0.2-incubating-RCx/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
(original)
+++ aries/branches/0.2-incubating-RCx/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/OBRAriesResolver.java
Sun May 29 04:36:27 2011
@@ -35,6 +35,7 @@ import javax.xml.transform.stream.Stream
 
 import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.Content;
+import org.apache.aries.application.VersionRange;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationResolver;
 import org.apache.aries.application.management.BundleInfo;
@@ -169,7 +170,9 @@ public class OBRAriesResolver implements
   public BundleInfo getBundleInfo(String bundleSymbolicName, Version bundleVersion)
   {
     Map<String, String> attribs = new HashMap<String, String>();
-    attribs.put(Resource.VERSION, bundleVersion.toString());
+    // bundleVersion is an exact version - so ensure right version filter is generated
+    VersionRange range = ManifestHeaderProcessor.parseVersionRange(bundleVersion.toString(),
true);
+    attribs.put(Resource.VERSION, range.toString());
     String filterString = ManifestHeaderProcessor.generateFilter(Resource.SYMBOLIC_NAME,
bundleSymbolicName, attribs);
     Resource[] resources;
     try {

Modified: aries/branches/0.2-incubating-RCx/application/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/0.2-incubating-RCx/application/pom.xml?rev=1128818&r1=1128817&r2=1128818&view=diff
==============================================================================
--- aries/branches/0.2-incubating-RCx/application/pom.xml (original)
+++ aries/branches/0.2-incubating-RCx/application/pom.xml Sun May 29 04:36:27 2011
@@ -49,7 +49,7 @@
             <dependency>
                 <groupId>org.apache.aries</groupId>
                 <artifactId>org.apache.aries.util</artifactId>
-                <version>0.2-incubating</version>
+                <version>0.2.1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.aries.blueprint</groupId>

Modified: aries/branches/0.2-incubating-RCx/util/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/0.2-incubating-RCx/util/pom.xml?rev=1128818&r1=1128817&r2=1128818&view=diff
==============================================================================
--- aries/branches/0.2-incubating-RCx/util/pom.xml (original)
+++ aries/branches/0.2-incubating-RCx/util/pom.xml Sun May 29 04:36:27 2011
@@ -26,7 +26,7 @@
 
     <artifactId>org.apache.aries.util</artifactId>
     <packaging>bundle</packaging>
-    <version>0.3-incubating-SNAPSHOT</version>
+    <version>0.2.1-SNAPSHOT</version>
     <name>Apache Aries Util</name>
     <description>
         This bundle contains the OSGi common util for Apache Aries

Modified: aries/branches/0.2-incubating-RCx/util/src/main/java/org/apache/aries/util/VersionRange.java
URL: http://svn.apache.org/viewvc/aries/branches/0.2-incubating-RCx/util/src/main/java/org/apache/aries/util/VersionRange.java?rev=1128818&r1=1128817&r2=1128818&view=diff
==============================================================================
--- aries/branches/0.2-incubating-RCx/util/src/main/java/org/apache/aries/util/VersionRange.java
(original)
+++ aries/branches/0.2-incubating-RCx/util/src/main/java/org/apache/aries/util/VersionRange.java
Sun May 29 04:36:27 2011
@@ -62,13 +62,12 @@ public final class VersionRange {
      *            whether this is an exact version
      */
     public VersionRange(String version, boolean exactVersion) {
-        this.version = version;
         if (exactVersion) {
-            processExactVersionAttribute(this.version);
+            processExactVersionAttribute(version);
         } else {
+            this.version = version;
             processVersionAttribute(this.version);
         }
-
         assertInvariants();
     }
 



Mime
View raw message