aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjwat...@apache.org
Subject svn commit: r1653939 - in /aries/trunk/subsystem: subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/ subsystem-itests/src/test/resources/composite2/OSGI-INF/
Date Thu, 22 Jan 2015 16:35:38 GMT
Author: tjwatson
Date: Thu Jan 22 16:35:38 2015
New Revision: 1653939

URL: http://svn.apache.org/r1653939
Log:
    ARIES-1283 - Subsystem import/export service header parsing is incorrect


Modified:
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/Grammar.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemExportServiceHeader.java
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemImportServiceHeader.java
    aries/trunk/subsystem/subsystem-itests/src/test/resources/composite2/OSGI-INF/SUBSYSTEM.MF

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/Grammar.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/Grammar.java?rev=1653939&r1=1653938&r2=1653939&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/Grammar.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/Grammar.java
Thu Jan 22 16:35:38 2015
@@ -134,9 +134,6 @@ public interface Grammar {
 
 	public static final String OBJECTCLASS = PACKAGENAME;
 	public static final String SERVICE_OR_WILDCARD = "(" + OBJECTCLASS + "|[*])(?:;\\s*(?:"
+ PARAMETER + "))*";
-	public static final String SUBSYSTEM_IMPORTEXPORTSERVICE = SERVICE_OR_WILDCARD + "(?:,\\s*(?:"
+ SERVICE_OR_WILDCARD + "))*";
-    public static final String SUBSYSTEM_EXPORTSERVICE = SUBSYSTEM_IMPORTEXPORTSERVICE;
-	public static final String SUBSYSTEM_IMPORTSERVICE = SUBSYSTEM_IMPORTEXPORTSERVICE;
 
 	public static final String RESOURCE = SYMBOLICNAME + "(?:;\\s*(?:" + PARAMETER + "))*";
 	public static final String PREFERRED_PROVIDER = RESOURCE + "(?:,\\s*(?:" + RESOURCE + "))*";

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemExportServiceHeader.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemExportServiceHeader.java?rev=1653939&r1=1653938&r2=1653939&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemExportServiceHeader.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemExportServiceHeader.java
Thu Jan 22 16:35:38 2015
@@ -164,7 +164,7 @@ public class SubsystemExportServiceHeade
 
 	public static final String NAME = SubsystemConstants.SUBSYSTEM_EXPORTSERVICE;
 
-    private static final Pattern PATTERN = Pattern.compile("(" + Grammar.SUBSYSTEM_EXPORTSERVICE
+ ")(?=,|\\z)");
+    private static final Pattern PATTERN = Pattern.compile("(" + Grammar.SERVICE_OR_WILDCARD
+ ")(?=,|\\z)");
 
 	private final Set<Clause> clauses = new HashSet<Clause>();
 

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemImportServiceHeader.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemImportServiceHeader.java?rev=1653939&r1=1653938&r2=1653939&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemImportServiceHeader.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/archive/SubsystemImportServiceHeader.java
Thu Jan 22 16:35:38 2015
@@ -144,7 +144,7 @@ public class SubsystemImportServiceHeade
 
 	public static final String NAME = SubsystemConstants.SUBSYSTEM_IMPORTSERVICE;
 
-    private static final Pattern PATTERN = Pattern.compile("(" + Grammar.SUBSYSTEM_IMPORTSERVICE
+ ")(?=,|\\z)");
+    private static final Pattern PATTERN = Pattern.compile("(" + Grammar.SERVICE_OR_WILDCARD
+ ")(?=,|\\z)");
 
 	private static Collection<Clause> processHeader(String header) {
 		Matcher matcher = PATTERN.matcher(header);

Modified: aries/trunk/subsystem/subsystem-itests/src/test/resources/composite2/OSGI-INF/SUBSYSTEM.MF
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/resources/composite2/OSGI-INF/SUBSYSTEM.MF?rev=1653939&r1=1653938&r2=1653939&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/resources/composite2/OSGI-INF/SUBSYSTEM.MF
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/resources/composite2/OSGI-INF/SUBSYSTEM.MF
Thu Jan 22 16:35:38 2015
@@ -2,5 +2,5 @@ Subsystem-SymbolicName: org.apache.aries
 Subsystem-Type: osgi.subsystem.composite
 Subsystem-Content: org.apache.aries.subsystem.itests.tb4;version="[1.0.0,1.0.0]"
 Import-Package: org.osgi.framework,org.osgi.util.tracker
-Subsystem-ExportService: *;filter:="(test=tb4)"
-Subsystem-ImportService: *;filter:="(test=testCompositeServiceImports)"
\ No newline at end of file
+Subsystem-ExportService: does.not.exist; filter:="(a=b)",*;filter:="(test=tb4)", does.not.exist1;
filter:="(q=g)"
+Subsystem-ImportService: does.not.exist; filter:="(a=b)",*;filter:="(test=testCompositeServiceImports)",does.not.exist1;
filter:="(q=g)"
\ No newline at end of file



Mime
View raw message