Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/forceQualifierUpdate.txt1
-rw-r--r--bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.arm/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.s390/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.s390/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.x86/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.win32.win32.x86/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.launcher/pom.xml2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/pom.xml2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/compatibility/state/StateConverter.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java6
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java6
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java6
-rw-r--r--bundles/org.eclipse.osgi.services/pom.xml2
-rw-r--r--bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.osgi.tests/pom.xml4
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/AbstractBundleTests.java70
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleTests.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java36
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ListenerTests.java227
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/LoggingTests.java41
-rwxr-xr-xbundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java57
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/CaseMapPerformanceTest.java96
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/AllTests.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/TestCaseinsensitiveMap.java113
-rw-r--r--bundles/org.eclipse.osgi.util/pom.xml2
-rw-r--r--bundles/org.eclipse.osgi/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/CaseInsensitiveDictionaryMap.java201
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java33
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java23
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java13
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java44
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/util/TextProcessor.java4
-rw-r--r--bundles/org.eclipse.osgi/pom.xml4
-rw-r--r--bundles/org.eclipse.osgi/supplement/.settings/org.eclipse.pde.api.tools.prefs1
-rw-r--r--bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.osgi/supplement/pom.xml4
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java37
-rw-r--r--features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist6
-rwxr-xr-xfeatures/org.eclipse.equinox.executable.feature/feature.xml2
-rw-r--r--features/org.eclipse.equinox.executable.feature/forceQualifierUpdate.txt3
-rw-r--r--features/org.eclipse.equinox.executable.feature/pom.xml4
-rw-r--r--launcher-binary-parent/pom.xml2
-rw-r--r--pom.xml4
80 files changed, 912 insertions, 254 deletions
diff --git a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/build.properties b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/build.properties
index 73a157ba6..1906e1331 100644
--- a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/build.properties
@@ -17,4 +17,4 @@ bin.includes = META-INF/,\
customBuildCallbacks=customBuildCallbacks.xml
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/forceQualifierUpdate.txt b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/forceQualifierUpdate.txt
index 2df2386a0..708b66f85 100644
--- a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/forceQualifierUpdate.txt
+++ b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/forceQualifierUpdate.txt
@@ -2,3 +2,4 @@
Bug 403352 - Update all parent versions to match our build stream
Bug 532515 - Comparator erros in launcher in I20180315-2000
Bug 548432 - Remove launcher bundles for unsupported platforms
+Bug 550714 - Comparator errors in I20190903-1110 \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml
index 6478ca1b0..bc4eba91b 100644
--- a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/build.properties
index 6fe6b2b6c..5e804f405 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/build.properties
@@ -16,4 +16,4 @@ bin.includes = META-INF/,\
about.html
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/pom.xml
index 0bb2cc6d9..7d9a68cae 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties
index 4c78a2f71..a255cde96 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties
@@ -16,4 +16,4 @@ bin.includes = META-INF/,\
about.html
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/pom.xml
index eeb480f90..0de9a68b6 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.arm/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/build.properties
index 8615b1bfb..ed00983a0 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/build.properties
@@ -16,4 +16,4 @@ bin.includes = META-INF/,\
about.html
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/pom.xml
index 486da1309..dc4809e94 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/build.properties
index 7ed90689b..0e16b9d53 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/build.properties
@@ -17,4 +17,4 @@ bin.includes = META-INF/,\
customBuildCallbacks=customBuildCallbacks.xml
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/pom.xml
index e8e8770bb..162874782 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/build.properties
index 894c5df59..a9d57825a 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/build.properties
@@ -17,4 +17,4 @@ bin.includes = META-INF/,\
customBuildCallbacks=customBuildCallbacks.xml
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/pom.xml
index 79e99a519..52d555990 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/build.properties
index f86f41bb3..aff89dbe4 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/build.properties
@@ -17,4 +17,4 @@ bin.includes = META-INF/,\
customBuildCallbacks=customBuildCallbacks.xml
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml
index a3dc181a6..989502367 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/build.properties b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/build.properties
index 595c29c4c..3a3f7cdef 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/build.properties
@@ -17,4 +17,4 @@ bin.includes = META-INF/,\
customBuildCallbacks=customBuildCallbacks.xml
generateSourceBundle=false
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml
index f33405c61..20412c09c 100644
--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/build.properties b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/build.properties
index 15a995836..8a70047b5 100644
--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/build.properties
@@ -16,4 +16,4 @@ bin.includes = META-INF/,\
about.html
generateSourceBundle=false
customBuildCallbacks=customBuildCallbacks.xml
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml
index 3d17ffd9b..cf14c3232 100644
--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/build.properties b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/build.properties
index 43f4c8139..47b4ab763 100644
--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/build.properties
+++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/build.properties
@@ -16,4 +16,4 @@ bin.includes = META-INF/,\
about.html
generateSourceBundle=false
customBuildCallbacks=customBuildCallbacks.xml
-binaryTag=v20190715-0545
+binaryTag=v20190907-0026
diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml
index 543072825..60cd612fd 100644
--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>launcher-binary-parent</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../launcher-binary-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.launcher/pom.xml b/bundles/org.eclipse.equinox.launcher/pom.xml
index 43849b5b8..eec58cea2 100644
--- a/bundles/org.eclipse.equinox.launcher/pom.xml
+++ b/bundles/org.eclipse.equinox.launcher/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.osgi.compatibility.state/pom.xml b/bundles/org.eclipse.osgi.compatibility.state/pom.xml
index 32381fc0f..30ba2fc05 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/pom.xml
+++ b/bundles/org.eclipse.osgi.compatibility.state/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.osgi</groupId>
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/compatibility/state/StateConverter.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/compatibility/state/StateConverter.java
index f3115f089..ccd7de19f 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/compatibility/state/StateConverter.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/compatibility/state/StateConverter.java
@@ -210,7 +210,7 @@ class StateConverter {
if (map.isEmpty())
return ""; //$NON-NLS-1$
Set<Entry<String, V>> set = map.entrySet();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (Entry<String, V> entry : set) {
sb.append("; "); //$NON-NLS-1$
String key = entry.getKey();
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 0ddf0183a..fb14b6a4b 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -281,7 +281,7 @@ public class ResolverImpl implements Resolver {
// check to see if the bundle is disabled
DisabledInfo[] disabledInfos = state.getDisabledInfos(bundleDesc);
if (disabledInfos.length > 0) {
- StringBuffer message = new StringBuffer();
+ StringBuilder message = new StringBuilder();
for (int i = 0; i < disabledInfos.length; i++) {
if (i > 0)
message.append(' ');
@@ -303,7 +303,7 @@ public class ResolverImpl implements Resolver {
matchedEE = true;
}
if (!matchedEE) {
- StringBuffer bundleEE = new StringBuffer(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT.length() + 20);
+ StringBuilder bundleEE = new StringBuilder(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT.length() + 20);
bundleEE.append(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT).append(": "); //$NON-NLS-1$
for (int i = 0; i < ees.length; i++) {
if (i > 0)
@@ -1025,7 +1025,7 @@ public class ResolverImpl implements Resolver {
}
private void printCombination(int[] curCombination) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append('[');
for (int i = 0; i < curCombination.length; i++) {
sb.append(curCombination[i]);
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
index a1d3507e0..7c084214f 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
@@ -56,7 +56,7 @@ public abstract class BaseDescriptionImpl implements BaseDescription {
return ""; //$NON-NLS-1$
String assignment = directives ? ":=" : "="; //$NON-NLS-1$//$NON-NLS-2$
Set<Entry<String, V>> set = map.entrySet();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (Entry<String, V> entry : set) {
sb.append("; "); //$NON-NLS-1$
String key = entry.getKey();
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
index a0d1464e8..c7b1bf071 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
@@ -53,7 +53,7 @@ final class BundleDeltaImpl implements BundleDelta {
}
private static String toTypeString(int type) {
- StringBuffer typeStr = new StringBuffer();
+ StringBuilder typeStr = new StringBuilder();
if ((type & BundleDelta.ADDED) != 0)
typeStr.append("ADDED,"); //$NON-NLS-1$
if ((type & BundleDelta.REMOVED) != 0)
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
index b22852037..ee40e1b00 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
@@ -137,7 +137,7 @@ public class BundleSpecificationImpl extends VersionConstraintImpl implements Bu
}
private String createFilterDirective() {
- StringBuffer filter = new StringBuffer();
+ StringBuilder filter = new StringBuilder();
filter.append("(&"); //$NON-NLS-1$
synchronized (this.monitor) {
addFilterAttribute(filter, BundleRevision.BUNDLE_NAMESPACE, getName());
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
index 7bfccba1a..d2e4c78cd 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
@@ -114,7 +114,7 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements
}
static String toString(String[] list) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (String string : list)
buffer.append(string).append(',');
if (buffer.length() > 0)
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
index 6c97a19ff..57be3021d 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
@@ -76,7 +76,7 @@ public class GenericDescriptionImpl extends BaseDescriptionImpl implements Gener
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(Constants.PROVIDE_CAPABILITY).append(": ").append(getType()); //$NON-NLS-1$
Map<String, Object> attrs = getDeclaredAttributes();
sb.append(toString(attrs, false));
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
index 1fa60bf68..cef6d8798 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
@@ -73,7 +73,7 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(Constants.REQUIRE_CAPABILITY).append(": ").append(getType()); //$NON-NLS-1$
if (matchingFilter != null)
sb.append("; filter=\"").append(getMatchingFilter()).append('"'); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
index a39d021d0..f3f1ce008 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
@@ -154,7 +154,7 @@ public class HostSpecificationImpl extends VersionConstraintImpl implements Host
}
private String createFilterDirective() {
- StringBuffer filter = new StringBuffer();
+ StringBuilder filter = new StringBuilder();
filter.append("(&"); //$NON-NLS-1$
synchronized (this.monitor) {
addFilterAttribute(filter, BundleRevision.HOST_NAMESPACE, getName());
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
index 30e190832..7c99f29df 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
@@ -238,7 +238,7 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem
}
private String createFilterDirective() {
- StringBuffer filter = new StringBuffer();
+ StringBuilder filter = new StringBuilder();
filter.append("(&"); //$NON-NLS-1$
synchronized (this.monitor) {
addFilterAttribute(filter, BundleRevision.PACKAGE_NAMESPACE, getName(), false);
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
index 91f51be7b..3bd8b580a 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
@@ -116,7 +116,7 @@ public class NativeCodeDescriptionImpl extends BaseDescriptionImpl implements Na
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
String[] paths = getNativePaths();
for (int i = 0; i < paths.length; i++) {
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
index 4408640dd..292ef0e91 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
@@ -174,7 +174,7 @@ public class NativeCodeSpecificationImpl extends VersionConstraintImpl implement
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
NativeCodeDescription[] suppliers = getPossibleSuppliers();
for (int i = 0; i < suppliers.length; i++) {
if (i > 0)
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
index b96a7ae8b..37c43f786 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
@@ -165,7 +165,7 @@ public class StateBuilder {
if (aliasReqs == null)
continue;
for (ManifestElement aliasReq : aliasReqs) {
- StringBuffer strBuf = new StringBuffer();
+ StringBuilder strBuf = new StringBuilder();
strBuf.append(aliasReq.getValue()).append(':').append(genericAlias[2]);
String filter = aliasReq.getAttribute(Constants.SELECTION_FILTER_ATTRIBUTE);
if (filter != null)
@@ -192,7 +192,7 @@ public class StateBuilder {
if (aliasCapabilities == null)
continue;
for (ManifestElement aliasCapability : aliasCapabilities) {
- StringBuffer strBuf = new StringBuffer();
+ StringBuilder strBuf = new StringBuilder();
strBuf.append(aliasCapability.getValue()).append(':').append(genericAlias[2]);
for (Enumeration<String> keys = aliasCapability.getKeys(); keys != null && keys.hasMoreElements();) {
String key = keys.nextElement();
@@ -532,7 +532,7 @@ public class StateBuilder {
if (breeFilters.size() == 1) {
filterSpec = breeFilters.get(0);
} else {
- StringBuffer filterBuf = new StringBuffer("(|"); //$NON-NLS-1$
+ StringBuilder filterBuf = new StringBuilder("(|"); //$NON-NLS-1$
for (String breeFilter : breeFilters) {
filterBuf.append(breeFilter);
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
index 9f53f941c..3fad96067 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
@@ -198,18 +198,18 @@ abstract class VersionConstraintImpl implements VersionConstraint {
}
}
- static StringBuffer addFilterAttributes(StringBuffer filter, Map<String, ?> attributes) {
+ static StringBuilder addFilterAttributes(StringBuilder filter, Map<String, ?> attributes) {
for (Map.Entry<String, ?> entry : attributes.entrySet()) {
addFilterAttribute(filter, entry.getKey(), entry.getValue());
}
return filter;
}
- static StringBuffer addFilterAttribute(StringBuffer filter, String attr, Object value) {
+ static StringBuilder addFilterAttribute(StringBuilder filter, String attr, Object value) {
return addFilterAttribute(filter, attr, value, true);
}
- static StringBuffer addFilterAttribute(StringBuffer filter, String attr, Object value, boolean escapeWildCard) {
+ static StringBuilder addFilterAttribute(StringBuilder filter, String attr, Object value, boolean escapeWildCard) {
if (value instanceof VersionRange) {
VersionRange range = (VersionRange) value;
filter.append(range.toFilterString(attr));
diff --git a/bundles/org.eclipse.osgi.services/pom.xml b/bundles/org.eclipse.osgi.services/pom.xml
index f6cd601e4..d80f009c7 100644
--- a/bundles/org.eclipse.osgi.services/pom.xml
+++ b/bundles/org.eclipse.osgi.services/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.osgi</groupId>
diff --git a/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF
index 7b8f8cef6..242bf4eba 100644
--- a/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Core OSGi Tests
Bundle-SymbolicName: org.eclipse.osgi.tests;singleton:=true
-Bundle-Version: 3.15.0.qualifier
+Bundle-Version: 3.15.100.qualifier
Bundle-Vendor: Eclipse.org
Require-Bundle:
org.eclipse.core.runtime,
diff --git a/bundles/org.eclipse.osgi.tests/pom.xml b/bundles/org.eclipse.osgi.tests/pom.xml
index ec9ccc358..f908b65c8 100644
--- a/bundles/org.eclipse.osgi.tests/pom.xml
+++ b/bundles/org.eclipse.osgi.tests/pom.xml
@@ -14,12 +14,12 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi.tests</artifactId>
- <version>3.15.0-SNAPSHOT</version>
+ <version>3.15.100-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/AbstractBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/AbstractBundleTests.java
index fc5a0a2eb..35b968f4e 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/AbstractBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/AbstractBundleTests.java
@@ -13,9 +13,24 @@
*******************************************************************************/
package org.eclipse.osgi.tests.bundles;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.Attributes;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
import org.eclipse.core.tests.harness.CoreTest;
+import org.eclipse.osgi.launch.Equinox;
import org.eclipse.osgi.tests.OSGiTestsActivator;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkEvent;
public class AbstractBundleTests extends CoreTest {
public static int BUNDLE_LISTENER = 0x01;
@@ -28,6 +43,36 @@ public class AbstractBundleTests extends CoreTest {
public static EventListenerTestResults frameworkListenerResults;
public static BundleInstaller installer;
+ static class BundleBuilder {
+ static class BundleManifestBuilder {
+ private final Manifest manifest = new Manifest();
+
+ public Manifest build() {
+ manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
+ return manifest;
+ }
+
+ public BundleManifestBuilder symbolicName(String value) {
+ manifest.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, value);
+ return this;
+ }
+ }
+
+ private final BundleManifestBuilder manifestBuilder = new BundleManifestBuilder();
+
+ public InputStream build() throws IOException {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ JarOutputStream jos = new JarOutputStream(baos, manifestBuilder.build());
+ jos.close();
+ return new ByteArrayInputStream(baos.toByteArray());
+ }
+
+ public BundleBuilder symbolicName(String value) {
+ manifestBuilder.symbolicName(value);
+ return this;
+ }
+ }
+
protected void setUp() throws Exception {
installer = new BundleInstaller(BUNDLES_ROOT, OSGiTestsActivator.getContext());
installer.refreshPackages(null);
@@ -210,4 +255,27 @@ public class AbstractBundleTests extends CoreTest {
return result.toString();
}
+ protected Map<String, Object> createConfiguration() {
+ File file = OSGiTestsActivator.getContext().getDataFile(getName());
+ Map<String, Object> result = new HashMap<String, Object>();
+ result.put(Constants.FRAMEWORK_STORAGE, file.getAbsolutePath());
+ return result;
+ }
+
+ protected void initAndStart(Equinox equinox) throws BundleException {
+ equinox.init();
+ equinox.start();
+ }
+
+ protected void stopQuietly(Equinox equinox) {
+ if (equinox == null)
+ return;
+ try {
+ equinox.stop();
+ equinox.waitForStop(5000);
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+
} \ No newline at end of file
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleTests.java
index 5b04ee49f..0b497d5ba 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleTests.java
@@ -36,6 +36,7 @@ public class BundleTests {
suite.addTest(ClassLoadingBundleTests.suite());
suite.addTest(NativeCodeBundleTests.suite());
suite.addTest(PlatformAdminBundleTests.suite());
+ suite.addTest(ListenerTests.suite());
return suite;
}
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
index 35aee2deb..0908f9227 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
@@ -13,15 +13,20 @@
*******************************************************************************/
package org.eclipse.osgi.tests.bundles;
-import java.io.*;
-import java.util.HashMap;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.util.Map;
-import java.util.jar.*;
+import java.util.jar.Attributes;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.osgi.launch.Equinox;
import org.eclipse.osgi.tests.OSGiTestsActivator;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkEvent;
/*
* The framework must discard a persisted bundle when the
@@ -155,13 +160,6 @@ public class DiscardBundleTests extends AbstractBundleTests {
return manifest;
}
- private Map<String, Object> createConfiguration() {
- File file = OSGiTestsActivator.getContext().getDataFile(getName());
- Map<String, Object> result = new HashMap<String, Object>();
- result.put(Constants.FRAMEWORK_STORAGE, file.getAbsolutePath());
- return result;
- }
-
private void doTest(Map<String, ?> configuration, boolean discard) throws Exception {
doTest(configuration, discard, getDirectoryLocation());
doTest(configuration, discard, getJarLocation());
@@ -206,11 +204,6 @@ public class DiscardBundleTests extends AbstractBundleTests {
return new File(root, BUNDLE_JAR);
}
- private void initAndStart(Equinox equinox) throws BundleException {
- equinox.init();
- equinox.start();
- }
-
private Equinox restart(Equinox equinox, Map<String, ?> configuration) throws BundleException, InterruptedException {
stop(equinox);
equinox = new Equinox(configuration);
@@ -224,17 +217,6 @@ public class DiscardBundleTests extends AbstractBundleTests {
assertEquals("The framework was not stopped", FrameworkEvent.STOPPED, event.getType());
}
- private void stopQuietly(Equinox equinox) {
- if (equinox == null)
- return;
- try {
- equinox.stop();
- equinox.waitForStop(5000);
- } catch (Exception e) {
- // Ignore
- }
- }
-
private void touchFile(File file) {
if (file.isDirectory())
file = new File(file, BUNDLE_MANIFEST);
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ListenerTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ListenerTests.java
new file mode 100644
index 000000000..7b693d9e7
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ListenerTests.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2019 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osgi.tests.bundles;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.osgi.launch.Equinox;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.BundleListener;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.framework.startlevel.FrameworkStartLevel;
+
+public class ListenerTests extends AbstractBundleTests {
+
+ private String methodName;
+ private List<Bundle> bundles;
+ private Equinox equinox;
+ private BundleContext bundleContext;
+
+ public static Test suite() {
+ return new TestSuite(ListenerTests.class);
+ }
+
+ public void setUp() throws Exception {
+ methodName = getName();
+ simpleResults = new TestResults();
+ bundles = new ArrayList<>();
+
+ Map<String, Object> configuration = createConfiguration();
+ equinox = new Equinox(configuration);
+ initAndStart(equinox);
+
+ bundleContext = equinox.getBundleContext();
+
+ for (int i = 0; i < 50; i++) {
+ Bundle b = installBundle(methodName + i);
+ bundles.add(b);
+ b.start();
+ }
+ }
+
+ public void tearDown() throws Exception {
+ simpleResults = null;
+ for (Bundle b : bundles) {
+ if (b != null) {
+ b.stop();
+ b = null;
+ }
+ }
+ stopQuietly(equinox);
+ }
+
+ public void testBundleListenersOrder() throws Exception {
+
+ BundleListener[] expectedBundleListeners = new BundleListener[200];
+
+ int i = 100;
+ for (Bundle b : bundles) {
+ BundleListener bundleListener = createBundleListener();
+ b.getBundleContext().addBundleListener(bundleListener);
+ expectedBundleListeners[i] = bundleListener;
+ i = i + 2;
+ }
+
+ int j = 101;
+ for (Bundle b : bundles) {
+ BundleListener bundleListener = createBundleListener();
+ b.getBundleContext().addBundleListener(bundleListener);
+ expectedBundleListeners[j] = bundleListener;
+ j = j + 2;
+ }
+
+ //synchronous listener will be called first
+ i = 0;
+ for (Bundle b : bundles) {
+ BundleListener bundleListener = createSynchronousBundleListener();
+ b.getBundleContext().addBundleListener(bundleListener);
+ expectedBundleListeners[i] = bundleListener;
+ i = i + 2;
+ }
+
+ j = 1;
+ for (Bundle b : bundles) {
+ BundleListener bundleListener = createSynchronousBundleListener();
+ b.getBundleContext().addBundleListener(bundleListener);
+ expectedBundleListeners[j] = bundleListener;
+ j = j + 2;
+ }
+
+ installBundle(methodName + "51");
+
+ Object[] actualBundleListeners = simpleResults.getResults(200);
+
+ compareResults(expectedBundleListeners, actualBundleListeners);
+
+ }
+
+ public void testFrameworkListenersOrder() throws Exception {
+ FrameworkListener[] expectedFrameworkListeners = new FrameworkListener[100];
+
+ int i = 0;
+ for (Bundle b : bundles) {
+ FrameworkListener frameworkListener = createFrameworkListener();
+ b.getBundleContext().addFrameworkListener(frameworkListener);
+ expectedFrameworkListeners[i] = frameworkListener;
+ i = i + 2;
+ }
+
+ int j = 1;
+ for (Bundle b : bundles) {
+ FrameworkListener frameworkListener = createFrameworkListener();
+ b.getBundleContext().addFrameworkListener(frameworkListener);
+ expectedFrameworkListeners[j] = frameworkListener;
+ j = j + 2;
+ }
+
+ equinox.adapt(FrameworkStartLevel.class).setStartLevel(5);
+
+ Object[] actualFrameworkListeners = simpleResults.getResults(100);
+
+ compareResults(expectedFrameworkListeners, actualFrameworkListeners);
+ }
+
+ public void testServiceListenersOrder() throws Exception {
+ ServiceListener[] expectedServiceListeners = new ServiceListener[100];
+
+ int i = 0;
+ for (Bundle b : bundles) {
+ ServiceListener serviceListener = createServiceListener();
+ b.getBundleContext().addServiceListener(serviceListener);
+ expectedServiceListeners[i] = serviceListener;
+ i = i + 2;
+ }
+
+ int j = 1;
+ for (Bundle b : bundles) {
+ ServiceListener serviceListener = createServiceListener();
+ b.getBundleContext().addServiceListener(serviceListener);
+ expectedServiceListeners[j] = serviceListener;
+ j = j + 2;
+ }
+
+ Bundle bundle = installBundle(methodName + "51");
+ bundle.start();
+ ServiceRegistration<Object> reg = bundle.getBundleContext().registerService(Object.class, new Object(), null);
+
+ Object[] actualServiceListeners = simpleResults.getResults(100);
+
+ compareResults(expectedServiceListeners, actualServiceListeners);
+
+ if (reg != null) {
+ reg.unregister();
+ }
+
+ }
+
+ private BundleListener createBundleListener() {
+
+ BundleListener bundleListener = new BundleListener() {
+ public void bundleChanged(BundleEvent event) {
+ simpleResults.addEvent(this);
+ }
+ };
+ return bundleListener;
+ }
+
+ private BundleListener createSynchronousBundleListener() {
+
+ SynchronousBundleListener bundleListener = new SynchronousBundleListener() {
+ public void bundleChanged(BundleEvent event) {
+ simpleResults.addEvent(this);
+ }
+ };
+ return bundleListener;
+ }
+
+ private FrameworkListener createFrameworkListener() {
+ FrameworkListener frameworkListener = new FrameworkListener() {
+ @Override
+ public void frameworkEvent(FrameworkEvent event) {
+ simpleResults.addEvent(this);
+ }
+ };
+ return frameworkListener;
+ }
+
+ private ServiceListener createServiceListener() {
+ ServiceListener serviceListener = new ServiceListener() {
+
+ @Override
+ public void serviceChanged(ServiceEvent event) {
+ simpleResults.addEvent(this);
+ }
+ };
+ return serviceListener;
+ }
+
+ private Bundle installBundle(String name) throws BundleException, IOException {
+ Bundle bundle = bundleContext.installBundle(name, new BundleBuilder().symbolicName(name).build());
+ assertNotNull(name + " bundle does not exist", bundleContext.getBundle(name));
+ return bundle;
+ }
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/LoggingTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/LoggingTests.java
index 286ca3dc5..4ee71f245 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/LoggingTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/LoggingTests.java
@@ -13,17 +13,38 @@
*******************************************************************************/
package org.eclipse.osgi.tests.bundles;
-import java.util.*;
-import junit.framework.*;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestSuite;
import org.eclipse.core.internal.runtime.RuntimeLog;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.log.*;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.log.ExtendedLogEntry;
+import org.eclipse.equinox.log.ExtendedLogReaderService;
+import org.eclipse.equinox.log.ExtendedLogService;
+import org.eclipse.equinox.log.LogFilter;
import org.eclipse.equinox.log.Logger;
import org.eclipse.osgi.framework.log.FrameworkLog;
import org.eclipse.osgi.framework.log.FrameworkLogEntry;
-import org.osgi.framework.*;
-import org.osgi.service.event.*;
-import org.osgi.service.log.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+import org.osgi.service.log.LogService;
public class LoggingTests extends AbstractBundleTests {
static final String EQUINOX_LOGGER = "org.eclipse.equinox.logger";
@@ -115,16 +136,10 @@ public class LoggingTests extends AbstractBundleTests {
super(context);
}
- List entries = new ArrayList();
-
public void logging(IStatus status, String plugin) {
- entries.add(new ILogEntry(status, plugin));
checkContext(status);
}
- List getEntries() {
- return entries;
- }
}
class TestLogListener extends TestListener implements LogListener, LogFilter {
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
index 3d5225989..eb40f940e 100755
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
@@ -13,16 +13,10 @@
*******************************************************************************/
package org.eclipse.osgi.tests.bundles;
-import java.io.*;
-import java.util.HashMap;
import java.util.Map;
-import java.util.jar.*;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.osgi.launch.Equinox;
-import org.eclipse.osgi.tests.OSGiTestsActivator;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
/*
* The framework must persist data according to the value of the
@@ -35,35 +29,6 @@ import org.osgi.framework.Constants;
*
*/
public class PersistedBundleTests extends AbstractBundleTests {
- static class BundleBuilder {
- static class BundleManifestBuilder {
- private final Manifest manifest = new Manifest();
-
- public Manifest build() {
- manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
- return manifest;
- }
-
- public BundleManifestBuilder symbolicName(String value) {
- manifest.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, value);
- return this;
- }
- }
-
- private final BundleManifestBuilder manifestBuilder = new BundleManifestBuilder();
-
- public InputStream build() throws IOException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- JarOutputStream jos = new JarOutputStream(baos, manifestBuilder.build());
- jos.close();
- return new ByteArrayInputStream(baos.toByteArray());
- }
-
- public BundleBuilder symbolicName(String value) {
- manifestBuilder.symbolicName(value);
- return this;
- }
- }
private static final String ECLIPSE_STATESAVEDELAYINTERVAL = "eclipse.stateSaveDelayInterval";
@@ -185,26 +150,4 @@ public class PersistedBundleTests extends AbstractBundleTests {
}
}
- private Map<String, Object> createConfiguration() {
- File file = OSGiTestsActivator.getContext().getDataFile(getName());
- Map<String, Object> result = new HashMap<String, Object>();
- result.put(Constants.FRAMEWORK_STORAGE, file.getAbsolutePath());
- return result;
- }
-
- private void initAndStart(Equinox equinox) throws BundleException {
- equinox.init();
- equinox.start();
- }
-
- private void stopQuietly(Equinox equinox) {
- if (equinox == null)
- return;
- try {
- equinox.stop();
- equinox.waitForStop(5000);
- } catch (Exception e) {
- // Ignore
- }
- }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/CaseMapPerformanceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/CaseMapPerformanceTest.java
index 35d9bdb50..20bc21e79 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/CaseMapPerformanceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/CaseMapPerformanceTest.java
@@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.osgi.tests.perf;
+import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -20,6 +21,8 @@ import org.eclipse.core.tests.harness.PerformanceTestRunner;
import org.eclipse.osgi.framework.util.CaseInsensitiveDictionaryMap;
import org.eclipse.osgi.framework.util.Headers;
import org.eclipse.osgi.tests.OSGiTest;
+import org.junit.Assert;
+import org.osgi.framework.Constants;
public class CaseMapPerformanceTest extends OSGiTest {
static final String[] KEYS;
@@ -89,9 +92,9 @@ public class CaseMapPerformanceTest extends OSGiTest {
doTestMap(headers, 10);
}
- public void testXCaseMap020() {
- final Map<String, Object> headers = new CaseInsensitiveDictionaryMap<String, Object>(20);
- doTestMap(headers, 10);
+ public void testXCaseMap034() {
+ final Map<String, Object> headers = new CaseInsensitiveDictionaryMap<String, Object>(34);
+ doTestMap(headers, 34);
}
public void testXCaseMap100() {
@@ -100,15 +103,37 @@ public class CaseMapPerformanceTest extends OSGiTest {
}
private void doTestMap(final Map<String, Object> map, final int numKeys) {
- fillMap(map, numKeys);
new PerformanceTestRunner() {
protected void test() {
+ fillMap(map, numKeys);
doMapGet(map, numKeys);
}
}.run(this, 10, 10000);
}
+ public void testCommonKeyMap() {
+ final Map<String, Object> map = new CaseInsensitiveDictionaryMap<>(34);
+ new PerformanceTestRunner() {
+ protected void test() {
+ fillCommonKeyMap(map);
+ doCommonKeyMapGet(map);
+ }
+
+ }.run(this, 10, 10000);
+ }
+
+ public void testCommonHashMap() {
+ final Map<String, Object> map = new HashMap<>(34);
+ new PerformanceTestRunner() {
+ protected void test() {
+ fillCommonKeyMap(map);
+ doCommonKeyMapGet(map);
+ }
+
+ }.run(this, 10, 10000);
+ }
+
static void fillMap(Map<String, Object> map, int numKeys) {
map.clear();
for (int i = 0; i < numKeys; i++) {
@@ -116,10 +141,71 @@ public class CaseMapPerformanceTest extends OSGiTest {
}
}
+ static void fillCommonKeyMap(Map<String, Object> map) {
+ map.clear();
+ for (String key : COMMON_KEY_NAMES) {
+ map.put(key, VALUE);
+ }
+ }
+
static void doMapGet(Map<String, Object> map, int numKeys) {
for (int i = 0; i < numKeys; i++) {
- map.get(KEYS[i]);
+ Assert.assertEquals("Wrong value found.", VALUE, map.get(KEYS[i]));
+ }
+ }
+
+ static void doCommonKeyMapGet(Map<String, Object> map) {
+ for (String key : COMMON_KEY_NAMES) {
+ Assert.assertEquals("Wrong value found.", VALUE, map.get(key));
}
}
+ final static String[] COMMON_KEY_NAMES = new String[] {
+
+ // common core service property keys
+ Constants.OBJECTCLASS, //
+ Constants.SERVICE_BUNDLEID, //
+ Constants.SERVICE_CHANGECOUNT, //
+ Constants.SERVICE_DESCRIPTION, //
+ Constants.SERVICE_ID, //
+ Constants.SERVICE_PID, //
+ Constants.SERVICE_RANKING, //
+ Constants.SERVICE_SCOPE, //
+ Constants.SERVICE_VENDOR, //
+
+ // common SCR service property keys
+ "component.name", //$NON-NLS-1$
+ "component.id", //$NON-NLS-1$
+
+ // common meta-type property keys
+ "metatype.pid", //$NON-NLS-1$
+ "metatype.factory.pid", //$NON-NLS-1$
+
+ // event admin keys
+ "event.topics", //$NON-NLS-1$
+ "event.filter", //$NON-NLS-1$
+
+ // jmx keys
+ "jmx.objectname", //$NON-NLS-1$
+
+ // common bundle manifest headers
+ Constants.BUNDLE_ACTIVATIONPOLICY, //
+ Constants.BUNDLE_ACTIVATOR, //
+ Constants.BUNDLE_CLASSPATH, //
+ Constants.BUNDLE_LICENSE, //
+ Constants.BUNDLE_LOCALIZATION, //
+ Constants.BUNDLE_MANIFESTVERSION, //
+ Constants.BUNDLE_NAME, //
+ Constants.BUNDLE_NATIVECODE, //
+ Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, //
+ Constants.BUNDLE_SCM, //
+ Constants.BUNDLE_SYMBOLICNAME, //
+ Constants.BUNDLE_VENDOR, //
+ Constants.BUNDLE_VERSION, //
+ Constants.EXPORT_PACKAGE, //
+ Constants.FRAGMENT_HOST, //
+ Constants.IMPORT_PACKAGE, //
+ Constants.REQUIRE_BUNDLE, //
+ Constants.REQUIRE_CAPABILITY //
+ };
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/AllTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/AllTests.java
index a08745c8e..d86b15c06 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/AllTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/AllTests.java
@@ -25,6 +25,7 @@ public class AllTests extends TestSuite {
}
public AllTests() {
+ addTest(new TestSuite(TestCaseinsensitiveMap.class));
addTest(new TestSuite(ObjectPoolTestCase.class));
addTest(new TestSuite(ManifestElementTestCase.class));
addTest(new TestSuite(NLSTestCase.class));
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/TestCaseinsensitiveMap.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/TestCaseinsensitiveMap.java
new file mode 100644
index 000000000..72891a41d
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/TestCaseinsensitiveMap.java
@@ -0,0 +1,113 @@
+package org.eclipse.osgi.tests.util;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.core.tests.harness.CoreTest;
+import org.eclipse.osgi.framework.util.CaseInsensitiveDictionaryMap;
+import org.osgi.framework.Constants;
+
+public class TestCaseinsensitiveMap extends CoreTest {
+ @SuppressWarnings("deprecation")
+ static String[] COMMON_KEY_NAMES = new String[] { //
+
+ // common core service property keys
+ Constants.OBJECTCLASS, //
+ Constants.SERVICE_BUNDLEID, //
+ Constants.SERVICE_CHANGECOUNT, //
+ Constants.SERVICE_DESCRIPTION, //
+ Constants.SERVICE_ID, //
+ Constants.SERVICE_PID, //
+ Constants.SERVICE_RANKING, //
+ Constants.SERVICE_SCOPE, //
+ Constants.SERVICE_VENDOR, //
+
+ // common SCR service property keys
+ "component.name", //$NON-NLS-1$
+ "component.id", //$NON-NLS-1$
+
+ // common meta-type property keys
+ "metatype.pid", //$NON-NLS-1$
+ "metatype.factory.pid", //$NON-NLS-1$
+
+ // common event admin keys
+ "event.topics", //$NON-NLS-1$
+ "event.filter", //$NON-NLS-1$
+
+ // jmx keys
+ "jmx.objectname", //$NON-NLS-1$
+
+ // common bundle manifest headers
+ "Manifest-Version", // $NON-NLS-1$
+ Constants.BUNDLE_ACTIVATIONPOLICY, //
+ Constants.BUNDLE_ACTIVATOR, //
+ Constants.BUNDLE_CLASSPATH, //
+ Constants.BUNDLE_DESCRIPTION, //
+ Constants.BUNDLE_LICENSE, //
+ Constants.BUNDLE_LOCALIZATION, //
+ Constants.BUNDLE_MANIFESTVERSION, //
+ Constants.BUNDLE_NAME, //
+ Constants.BUNDLE_NATIVECODE, //
+ Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, //
+ Constants.BUNDLE_SCM, //
+ Constants.BUNDLE_SYMBOLICNAME, //
+ Constants.BUNDLE_VENDOR, //
+ Constants.BUNDLE_VERSION, //
+ Constants.DYNAMICIMPORT_PACKAGE, //
+ Constants.EXPORT_PACKAGE, //
+ Constants.FRAGMENT_HOST, //
+ Constants.IMPORT_PACKAGE, //
+ Constants.REQUIRE_BUNDLE, //
+ Constants.REQUIRE_CAPABILITY, //
+ Constants.PROVIDE_CAPABILITY //
+ };
+
+ String[] OTHER_KEY_NAMES = new String[] {"test.key0", //
+ "test.key1", //
+ "test.key2", //
+ "test.key3", //
+ "test.key4", //
+ "test.key5", //
+ "test.key6", //
+ "test.key7", //
+ "test.key8", //
+ "test.key9" //
+ };
+
+ private static final String VALUE1 = "-VALUE1";
+ private static final String VALUE2 = "-VALUE2";
+
+ public void testCommonKeys() {
+ testKeys(COMMON_KEY_NAMES);
+ }
+
+ public void testOtherKeys() {
+ testKeys(OTHER_KEY_NAMES);
+ }
+
+ private void testKeys(String[] keys) {
+ Map<String, Object> testMap = new CaseInsensitiveDictionaryMap<>();
+ // first put a value in for all common keys
+ for (String key : keys) {
+ testMap.put(key, key + VALUE1);
+ assertEquals("Wrong value found.", key + VALUE1, testMap.get(key));
+ }
+
+ Set<String> upperKeys = new HashSet<>();
+ for (String key : keys) {
+ // now upper case all keys
+ String upperKey = key.toUpperCase();
+ upperKeys.add(upperKey);
+ assertEquals("Wrong value found.", key + VALUE1, testMap.get(upperKey));
+ // replace with value2 using upper case
+ assertEquals("Wrong value found.", key + VALUE1, testMap.put(upperKey, key + VALUE2));
+ // both original key and upper case key should give same value
+ assertEquals("Wrong value found.", key + VALUE2, testMap.get(key));
+ assertEquals("Wrong value found.", key + VALUE2, testMap.get(upperKey));
+ }
+
+ Set<String> currentKeys = testMap.keySet();
+ assertEquals("Wrong number of keys.", upperKeys.size(), currentKeys.size());
+ assertTrue("Wrong keys found: " + currentKeys, upperKeys.containsAll(currentKeys));
+ }
+}
diff --git a/bundles/org.eclipse.osgi.util/pom.xml b/bundles/org.eclipse.osgi.util/pom.xml
index c3a9216f7..306b6091b 100644
--- a/bundles/org.eclipse.osgi.util/pom.xml
+++ b/bundles/org.eclipse.osgi.util/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.osgi</groupId>
diff --git a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
index ee2449cc7..bebe9d6a1 100644
--- a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
@@ -101,7 +101,7 @@ Bundle-Activator: org.eclipse.osgi.internal.framework.SystemBundleActivator
Bundle-Description: %systemBundle
Bundle-Copyright: %copyright
Bundle-Vendor: %eclipse.org
-Bundle-Version: 3.15.0.qualifier
+Bundle-Version: 3.15.100.qualifier
Bundle-Localization: systembundle
Bundle-DocUrl: http://www.eclipse.org
Eclipse-ExtensibleAPI: true
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/CaseInsensitiveDictionaryMap.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/CaseInsensitiveDictionaryMap.java
index 73086a5d3..6edaf1c67 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/CaseInsensitiveDictionaryMap.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/CaseInsensitiveDictionaryMap.java
@@ -16,9 +16,19 @@ package org.eclipse.osgi.framework.util;
import static java.util.Objects.requireNonNull;
-import java.util.*;
+import java.util.AbstractSet;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
import org.eclipse.osgi.internal.messages.Msg;
import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Constants;
/**
* CaseInsensitiveDictionaryMap classes. This class implements Dictionary and Map with
@@ -31,6 +41,151 @@ import org.eclipse.osgi.util.NLS;
* @since 3.13
*/
public class CaseInsensitiveDictionaryMap<K, V> extends Dictionary<K, V> implements Map<K, V> {
+ // common core service property keys
+ private static final CaseInsensitiveKey KEY_SERVICE_OBJECTCLASS = new CaseInsensitiveKey(Constants.OBJECTCLASS);
+ private static final CaseInsensitiveKey KEY_SERVICE_BUNDLE_ID = new CaseInsensitiveKey(Constants.SERVICE_BUNDLEID);
+ private static final CaseInsensitiveKey KEY_SERVICE_CHANGECOUNT = new CaseInsensitiveKey(Constants.SERVICE_CHANGECOUNT);
+ private static final CaseInsensitiveKey KEY_SERVICE_DESCRIPTION = new CaseInsensitiveKey(Constants.SERVICE_DESCRIPTION);
+ private static final CaseInsensitiveKey KEY_SERVICE_ID = new CaseInsensitiveKey(Constants.SERVICE_ID);
+ private static final CaseInsensitiveKey KEY_SERVICE_PID = new CaseInsensitiveKey(Constants.SERVICE_PID);
+ private static final CaseInsensitiveKey KEY_SERVICE_RANKING = new CaseInsensitiveKey(Constants.SERVICE_RANKING);
+ private static final CaseInsensitiveKey KEY_SERVICE_SCOPE = new CaseInsensitiveKey(Constants.SERVICE_SCOPE);
+ private static final CaseInsensitiveKey KEY_SERVICE_VENDER = new CaseInsensitiveKey(Constants.SERVICE_VENDOR);
+
+ // common SCR service property keys
+ private static final CaseInsensitiveKey KEY_COMPONENT_NAME = new CaseInsensitiveKey("component.name"); //$NON-NLS-1$
+ private static final CaseInsensitiveKey KEY_COMPONENT_ID = new CaseInsensitiveKey("component.id"); //$NON-NLS-1$
+
+ // common meta-type property keys
+ private static final CaseInsensitiveKey KEY_METATYPE_PID = new CaseInsensitiveKey("metatype.pid"); //$NON-NLS-1$
+ private static final CaseInsensitiveKey KEY_METATYPE_FACTORY_PID = new CaseInsensitiveKey("metatype.factory.pid"); //$NON-NLS-1$
+
+ // common event admin keys
+ private static final CaseInsensitiveKey KEY_EVENT_TOPICS = new CaseInsensitiveKey("event.topics"); //$NON-NLS-1$
+ private static final CaseInsensitiveKey KEY_EVENT_FILTER = new CaseInsensitiveKey("event.filter"); //$NON-NLS-1$
+
+ // jmx keys
+ private static final CaseInsensitiveKey KEY_JMX_OBJECTNAME = new CaseInsensitiveKey("jmx.objectname"); //$NON-NLS-1$
+
+ // common bundle manifest headers
+ private static final CaseInsensitiveKey KEY_JAR_MANIFESTVERSION = new CaseInsensitiveKey("Manifest-Version"); //$NON-NLS-1$
+ private static final CaseInsensitiveKey KEY_BUNDLE_ACTIVATIONPOLICY = new CaseInsensitiveKey(Constants.BUNDLE_ACTIVATIONPOLICY);
+ private static final CaseInsensitiveKey KEY_BUNDLE_ACTIVATOR = new CaseInsensitiveKey(Constants.BUNDLE_ACTIVATOR);
+ private static final CaseInsensitiveKey KEY_BUNDLE_CLASSPATH = new CaseInsensitiveKey(Constants.BUNDLE_CLASSPATH);
+ private static final CaseInsensitiveKey KEY_BUNDLE_DESCRIPTION = new CaseInsensitiveKey(Constants.BUNDLE_DESCRIPTION);
+ private static final CaseInsensitiveKey KEY_BUNDLE_LICENSE = new CaseInsensitiveKey(Constants.BUNDLE_LICENSE);
+ private static final CaseInsensitiveKey KEY_BUNDLE_LOCALIZATION = new CaseInsensitiveKey(Constants.BUNDLE_LOCALIZATION);
+ private static final CaseInsensitiveKey KEY_BUNDLE_MANIFESTVERSION = new CaseInsensitiveKey(Constants.BUNDLE_MANIFESTVERSION);
+ private static final CaseInsensitiveKey KEY_BUNDLE_NAME = new CaseInsensitiveKey(Constants.BUNDLE_NAME);
+ private static final CaseInsensitiveKey KEY_BUNDLE_NATIVECODE = new CaseInsensitiveKey(Constants.BUNDLE_NATIVECODE);
+ @SuppressWarnings("deprecation")
+ private static final CaseInsensitiveKey KEY_BUNDLE_REQUIREDEXECUTIONENVIRONMENT = new CaseInsensitiveKey(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
+ private static final CaseInsensitiveKey KEY_BUNDLE_SCM = new CaseInsensitiveKey(Constants.BUNDLE_SCM);
+ private static final CaseInsensitiveKey KEY_BUNDLE_SYMBOLICNAME = new CaseInsensitiveKey(Constants.BUNDLE_SYMBOLICNAME);
+ private static final CaseInsensitiveKey KEY_BUNDLE_VENDOR = new CaseInsensitiveKey(Constants.BUNDLE_VENDOR);
+ private static final CaseInsensitiveKey KEY_BUNDLE_VERSION = new CaseInsensitiveKey(Constants.BUNDLE_VERSION);
+ private static final CaseInsensitiveKey KEY_BUNDLE_DYNAMICIMPORT_PACKAGE = new CaseInsensitiveKey(Constants.DYNAMICIMPORT_PACKAGE);
+ private static final CaseInsensitiveKey KEY_BUNDLE_EXPORT_PACKAGE = new CaseInsensitiveKey(Constants.EXPORT_PACKAGE);
+ private static final CaseInsensitiveKey KEY_BUNDLE_FRAGMENT_HOST = new CaseInsensitiveKey(Constants.FRAGMENT_HOST);
+ private static final CaseInsensitiveKey KEY_BUNDLE_IMPORT_PACKAGE = new CaseInsensitiveKey(Constants.IMPORT_PACKAGE);
+ private static final CaseInsensitiveKey KEY_BUNDLE_REQUIRE_BUNDLE = new CaseInsensitiveKey(Constants.REQUIRE_BUNDLE);
+ private static final CaseInsensitiveKey KEY_BUNDLE_REQUIRE_CAPABILITY = new CaseInsensitiveKey(Constants.REQUIRE_CAPABILITY);
+ private static final CaseInsensitiveKey KEY_BUNDLE_PROVIDE_CAPABILITY = new CaseInsensitiveKey(Constants.PROVIDE_CAPABILITY);
+
+ @SuppressWarnings("deprecation")
+ public static CaseInsensitiveKey findCommonKeyIndex(String key) {
+ switch (key) {
+ // common core service property keys
+ case Constants.OBJECTCLASS :
+ return KEY_SERVICE_OBJECTCLASS;
+ case Constants.SERVICE_BUNDLEID :
+ return KEY_SERVICE_BUNDLE_ID;
+ case Constants.SERVICE_CHANGECOUNT :
+ return KEY_SERVICE_CHANGECOUNT;
+ case Constants.SERVICE_DESCRIPTION :
+ return KEY_SERVICE_DESCRIPTION;
+ case Constants.SERVICE_ID :
+ return KEY_SERVICE_ID;
+ case Constants.SERVICE_PID :
+ return KEY_SERVICE_PID;
+ case Constants.SERVICE_RANKING :
+ return KEY_SERVICE_RANKING;
+ case Constants.SERVICE_SCOPE :
+ return KEY_SERVICE_SCOPE;
+ case Constants.SERVICE_VENDOR :
+ return KEY_SERVICE_VENDER;
+
+ // common SCR service property keys
+ case "component.name" : //$NON-NLS-1$
+ return KEY_COMPONENT_NAME;
+ case "component.id" : //$NON-NLS-1$
+ return KEY_COMPONENT_ID;
+
+ // common meta-type property keys
+ case "metatype.pid" : //$NON-NLS-1$
+ return KEY_METATYPE_PID;
+ case "metatype.factory.pid" : //$NON-NLS-1$
+ return KEY_METATYPE_FACTORY_PID;
+
+ // common event admin keys
+ case "event.topics" : //$NON-NLS-1$
+ return KEY_EVENT_TOPICS;
+ case "event.filter" : //$NON-NLS-1$
+ return KEY_EVENT_FILTER;
+
+ // jmx keys
+ case "jmx.objectname" : //$NON-NLS-1$
+ return KEY_JMX_OBJECTNAME;
+
+ // common bundle manifest headers
+ case "Manifest-Version" : //$NON-NLS-1$
+ return KEY_JAR_MANIFESTVERSION;
+ case Constants.BUNDLE_ACTIVATIONPOLICY :
+ return KEY_BUNDLE_ACTIVATIONPOLICY;
+ case Constants.BUNDLE_ACTIVATOR :
+ return KEY_BUNDLE_ACTIVATOR;
+ case Constants.BUNDLE_CLASSPATH :
+ return KEY_BUNDLE_CLASSPATH;
+ case Constants.BUNDLE_DESCRIPTION :
+ return KEY_BUNDLE_DESCRIPTION;
+ case Constants.BUNDLE_LICENSE :
+ return KEY_BUNDLE_LICENSE;
+ case Constants.BUNDLE_LOCALIZATION :
+ return KEY_BUNDLE_LOCALIZATION;
+ case Constants.BUNDLE_MANIFESTVERSION :
+ return KEY_BUNDLE_MANIFESTVERSION;
+ case Constants.BUNDLE_NAME :
+ return KEY_BUNDLE_NAME;
+ case Constants.BUNDLE_NATIVECODE :
+ return KEY_BUNDLE_NATIVECODE;
+ case Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT :
+ return KEY_BUNDLE_REQUIREDEXECUTIONENVIRONMENT;
+ case Constants.BUNDLE_SCM :
+ return KEY_BUNDLE_SCM;
+ case Constants.BUNDLE_SYMBOLICNAME :
+ return KEY_BUNDLE_SYMBOLICNAME;
+ case Constants.BUNDLE_VENDOR :
+ return KEY_BUNDLE_VENDOR;
+ case Constants.BUNDLE_VERSION :
+ return KEY_BUNDLE_VERSION;
+ case Constants.DYNAMICIMPORT_PACKAGE :
+ return KEY_BUNDLE_DYNAMICIMPORT_PACKAGE;
+ case Constants.EXPORT_PACKAGE :
+ return KEY_BUNDLE_EXPORT_PACKAGE;
+ case Constants.FRAGMENT_HOST :
+ return KEY_BUNDLE_FRAGMENT_HOST;
+ case Constants.IMPORT_PACKAGE :
+ return KEY_BUNDLE_IMPORT_PACKAGE;
+ case Constants.REQUIRE_BUNDLE :
+ return KEY_BUNDLE_REQUIRE_BUNDLE;
+ case Constants.REQUIRE_CAPABILITY :
+ return KEY_BUNDLE_REQUIRE_CAPABILITY;
+ case Constants.PROVIDE_CAPABILITY :
+ return KEY_BUNDLE_PROVIDE_CAPABILITY;
+ }
+ return null;
+ }
+
final Map<Object, V> map;
/**
@@ -146,6 +301,10 @@ public class CaseInsensitiveDictionaryMap<K, V> extends Dictionary<K, V> impleme
*/
private Object keyWrap(Object key) {
if (key instanceof String) {
+ CaseInsensitiveKey commonKey = findCommonKeyIndex((String) key);
+ if (commonKey != null) {
+ return commonKey;
+ }
return new CaseInsensitiveKey((String) key);
}
return key;
@@ -178,10 +337,14 @@ public class CaseInsensitiveDictionaryMap<K, V> extends Dictionary<K, V> impleme
public V put(K key, V value) {
requireNonNull(value);
if (key instanceof String) {
- Object wrappedKey = keyWrap(((String) key).intern());
- V previous = map.remove(wrappedKey); // remove so we put key into map
- map.put(wrappedKey, value);
- return previous;
+ Object wrappedKey = keyWrap(key);
+ V existing = map.put(wrappedKey, value);
+ if (existing != null) {
+ // must remove to replace key if case has changed
+ map.remove(wrappedKey);
+ map.put(wrappedKey, value);
+ }
+ return existing;
}
return map.put(requireNonNull(key), value);
}
@@ -388,25 +551,33 @@ public class CaseInsensitiveDictionaryMap<K, V> extends Dictionary<K, V> impleme
}
}
+ static int computeHashCode(String key) {
+ int h = 1;
+ for (char c : key.toCharArray()) {
+ if (c < 0x80) { // ASCII
+ if (c >= 'A' && c <= 'Z') {
+ c += 'a' - 'A'; // convert to ASCII lowercase
+ }
+ } else {
+ c = Character.toLowerCase(Character.toUpperCase(c));
+ }
+ h = 31 * h + c;
+ }
+ return h;
+ }
+
private static final class CaseInsensitiveKey {
final String key;
- private transient int hashCode;
+ final private int hashCode;
CaseInsensitiveKey(String key) {
this.key = key;
+ this.hashCode = computeHashCode(key);
}
@Override
public int hashCode() {
- int h = hashCode;
- if (h != 0) {
- return h;
- }
- h = 1;
- for (char c : key.toCharArray()) {
- h = 31 * h + Character.toLowerCase(Character.toUpperCase(c));
- }
- return hashCode = h;
+ return hashCode;
}
@Override
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
index be275411d..746af6cb1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
@@ -31,21 +31,29 @@ import org.eclipse.osgi.storage.bundlefile.BundleEntry;
* A bundle entry for a class that is found in the shared classes cache
*/
public class CDSBundleEntry extends BundleEntry {
- String path;
- byte[] classbytes;
- BundleEntry wrapped;
+ final String path;
+ final byte[] classbytes;
+ final CDSBundleFile bundleFile;
/**
* The constructor
* @param path the path to the class file
* @param classbytes the magic cookie bytes for the class in the shared cache
- * @param wrapped the actual bundleEntry where the class comes from
+ * @param bundleFile the bundle file where the class comes from
*/
- public CDSBundleEntry(String path, byte[] classbytes, BundleEntry wrapped) {
+ public CDSBundleEntry(String path, byte[] classbytes, CDSBundleFile bundleFile) {
super();
this.path = path;
this.classbytes = classbytes;
- this.wrapped = wrapped;
+ this.bundleFile = bundleFile;
+ }
+
+ private BundleEntry getWrappedEntry() {
+ BundleEntry entry = bundleFile.getWrappedEntry(path);
+ if (entry == null) {
+ throw new IllegalStateException("Could not find original entry for the class: " + path); //$NON-NLS-1$
+ }
+ return entry;
}
/*
@@ -58,7 +66,7 @@ public class CDSBundleEntry extends BundleEntry {
*/
@Override
public URL getFileURL() {
- return wrapped.getFileURL();
+ return getWrappedEntry().getFileURL();
}
/*
@@ -71,7 +79,7 @@ public class CDSBundleEntry extends BundleEntry {
public InputStream getInputStream() throws IOException {
// someone is trying to get the real bytes of the class file!!
// just return the entry from the wrapped file instead of the magic cookie
- return wrapped.getInputStream();
+ return getWrappedEntry().getInputStream();
}
/*
@@ -83,9 +91,6 @@ public class CDSBundleEntry extends BundleEntry {
*/
@Override
public byte[] getBytes() throws IOException {
- if (classbytes == null) {
- classbytes = wrapped.getBytes();
- }
return classbytes;
}
@@ -99,7 +104,7 @@ public class CDSBundleEntry extends BundleEntry {
*/
@Override
public URL getLocalURL() {
- return wrapped.getLocalURL();
+ return getWrappedEntry().getLocalURL();
}
@Override
@@ -109,11 +114,11 @@ public class CDSBundleEntry extends BundleEntry {
@Override
public long getSize() {
- return wrapped.getSize();
+ return getWrappedEntry().getSize();
}
@Override
public long getTime() {
- return wrapped.getTime();
+ return getWrappedEntry().getTime();
}
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
index b6cdf28d0..29a8dd796 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
@@ -35,7 +35,7 @@ import org.eclipse.osgi.storage.bundlefile.BundleFileWrapper;
*/
public class CDSBundleFile extends BundleFileWrapper {
private final static String classFileExt = ".class"; //$NON-NLS-1$
- private URL url; // the URL to the content of the real bundle file
+ private final URL url; // the URL to the content of the real bundle file
private SharedClassURLHelper urlHelper; // the url helper set by the classloader
private boolean primed = false;
@@ -46,11 +46,13 @@ public class CDSBundleFile extends BundleFileWrapper {
public CDSBundleFile(BundleFile wrapped) {
super(wrapped);
// get the url to the content of the real bundle file
+ URL content = null;
try {
- this.url = new URL("file", "", wrapped.getBaseFile().getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
+ content = new URL("file", "", wrapped.getBaseFile().getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (MalformedURLException e) {
// do nothing
}
+ this.url = content;
}
public CDSBundleFile(BundleFile bundleFile, SharedClassURLHelper urlHelper) {
@@ -69,19 +71,22 @@ public class CDSBundleFile extends BundleFileWrapper {
*/
@Override
public BundleEntry getEntry(String path) {
- BundleEntry wrappedEntry = super.getEntry(path);
- if (wrappedEntry == null) {
- return null;
- }
if (!primed || !path.endsWith(classFileExt)) {
- return wrappedEntry;
+ return super.getEntry(path);
}
-
byte[] classbytes = getClassBytes(path.substring(0, path.length() - classFileExt.length()));
- BundleEntry be = new CDSBundleEntry(path, classbytes, wrappedEntry);
+ if (classbytes == null) {
+ return super.getEntry(path);
+ }
+
+ BundleEntry be = new CDSBundleEntry(path, classbytes, this);
return be;
}
+ BundleEntry getWrappedEntry(String path) {
+ return super.getEntry(path);
+ }
+
/**
* Returns the file url to the content of the actual bundle file
* @return the file url to the content of the actual bundle file
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
index 064983f21..19daba488 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
@@ -18,6 +18,7 @@ import java.security.PrivilegedAction;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
@@ -65,13 +66,13 @@ public class EquinoxEventPublisher {
* installed in the Framework.
*/
// Map of BundleContexts for bundle's BundleListeners.
- private final Map<BundleContextImpl, CopyOnWriteIdentityMap<BundleListener, BundleListener>> allBundleListeners = new HashMap<>();
+ private final Map<BundleContextImpl, CopyOnWriteIdentityMap<BundleListener, BundleListener>> allBundleListeners = new LinkedHashMap<>();
// Map of BundleContexts for bundle's SynchronousBundleListeners.
- private final Map<BundleContextImpl, CopyOnWriteIdentityMap<SynchronousBundleListener, SynchronousBundleListener>> allSyncBundleListeners = new HashMap<>();
+ private final Map<BundleContextImpl, CopyOnWriteIdentityMap<SynchronousBundleListener, SynchronousBundleListener>> allSyncBundleListeners = new LinkedHashMap<>();
// Map of BundleContexts for bundle's FrameworkListeners.
- private final Map<BundleContextImpl, CopyOnWriteIdentityMap<FrameworkListener, FrameworkListener>> allFrameworkListeners = new HashMap<>();
+ private final Map<BundleContextImpl, CopyOnWriteIdentityMap<FrameworkListener, FrameworkListener>> allFrameworkListeners = new LinkedHashMap<>();
public EquinoxEventPublisher(EquinoxContainer container) {
this.container = container;
@@ -163,7 +164,7 @@ public class EquinoxEventPublisher {
BundleContextImpl systemContext = null;
Set<Map.Entry<SynchronousBundleListener, SynchronousBundleListener>> systemBundleListenersSync = null;
synchronized (allSyncBundleListeners) {
- listenersSync = new HashMap<>(allSyncBundleListeners.size());
+ listenersSync = new LinkedHashMap<>(allSyncBundleListeners.size());
for (Map.Entry<BundleContextImpl, CopyOnWriteIdentityMap<SynchronousBundleListener, SynchronousBundleListener>> entry : allSyncBundleListeners.entrySet()) {
CopyOnWriteIdentityMap<SynchronousBundleListener, SynchronousBundleListener> listeners = entry.getValue();
if (!listeners.isEmpty()) {
@@ -183,7 +184,7 @@ public class EquinoxEventPublisher {
Set<Map.Entry<BundleListener, BundleListener>> systemBundleListenersAsync = null;
if ((event.getType() & (BundleEvent.STARTING | BundleEvent.STOPPING | BundleEvent.LAZY_ACTIVATION)) == 0) {
synchronized (allBundleListeners) {
- listenersAsync = new HashMap<>(allBundleListeners.size());
+ listenersAsync = new LinkedHashMap<>(allBundleListeners.size());
for (Map.Entry<BundleContextImpl, CopyOnWriteIdentityMap<BundleListener, BundleListener>> entry : allBundleListeners.entrySet()) {
CopyOnWriteIdentityMap<BundleListener, BundleListener> listeners = entry.getValue();
if (!listeners.isEmpty()) {
@@ -318,7 +319,7 @@ public class EquinoxEventPublisher {
// Build the listener snapshot
Map<BundleContextImpl, Set<Map.Entry<FrameworkListener, FrameworkListener>>> listenerSnapshot;
synchronized (allFrameworkListeners) {
- listenerSnapshot = new HashMap<>(allFrameworkListeners.size());
+ listenerSnapshot = new LinkedHashMap<>(allFrameworkListeners.size());
for (Map.Entry<BundleContextImpl, CopyOnWriteIdentityMap<FrameworkListener, FrameworkListener>> entry : allFrameworkListeners.entrySet()) {
CopyOnWriteIdentityMap<FrameworkListener, FrameworkListener> listeners = entry.getValue();
if (!listeners.isEmpty()) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
index f496852db..dea3620d1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
@@ -1667,7 +1667,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
}
private String parse_value() throws InvalidSyntaxException {
- StringBuffer sb = new StringBuffer(filterChars.length - pos);
+ StringBuilder sb = new StringBuilder(filterChars.length - pos);
parseloop: while (true) {
char c = filterChars[pos];
@@ -1703,7 +1703,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
}
private Object parse_substring() throws InvalidSyntaxException {
- StringBuffer sb = new StringBuffer(filterChars.length - pos);
+ StringBuilder sb = new StringBuilder(filterChars.length - pos);
List<String> operands = new ArrayList<>(10);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
index 61bfd8927..cfe4b48fb 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
@@ -393,7 +393,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
@Override
public String toString() {
Bundle b = getBundle();
- StringBuffer result = new StringBuffer(super.toString());
+ StringBuilder result = new StringBuilder(super.toString());
if (b == null)
return result.toString();
return result.append('[').append(b.getSymbolicName()).append(':').append(b.getVersion()).append("(id=").append(b.getBundleId()).append(")]").toString(); //$NON-NLS-1$//$NON-NLS-2$
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
index 32fa2ff8d..1fd7dcb6b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
@@ -410,7 +410,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter {
private String getDate(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
appendPaddedInt(c.get(Calendar.YEAR), 4, sb).append('-');
appendPaddedInt(c.get(Calendar.MONTH) + 1, 2, sb).append('-');
appendPaddedInt(c.get(Calendar.DAY_OF_MONTH), 2, sb).append(' ');
@@ -421,7 +421,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter {
return sb.toString();
}
- private StringBuffer appendPaddedInt(int value, int pad, StringBuffer buffer) {
+ private StringBuilder appendPaddedInt(int value, int pad, StringBuilder buffer) {
pad = pad - 1;
if (pad == 0)
return buffer.append(Integer.toString(value));
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
index c00e7728f..64bdc0eb9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
@@ -162,7 +162,7 @@ public final class SecurityRow implements ConditionalPermissionInfo {
return result;
}
- private static void escapeString(String str, StringBuffer output) {
+ private static void escapeString(String str, StringBuilder output) {
int len = str.length();
for (int i = 0; i < len; i++) {
char c = str.charAt(i);
@@ -186,7 +186,7 @@ public final class SecurityRow implements ConditionalPermissionInfo {
}
private static String unescapeString(String str) {
- StringBuffer output = new StringBuffer(str.length());
+ StringBuilder output = new StringBuilder(str.length());
int end = str.length();
for (int i = 0; i < end; i++) {
char c = str.charAt(i);
@@ -439,7 +439,7 @@ public final class SecurityRow implements ConditionalPermissionInfo {
}
static String getEncoded(String name, ConditionInfo[] conditionInfos, PermissionInfo[] permissionInfos, boolean deny) {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
if (deny)
result.append(ConditionalPermissionInfo.DENY);
else
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
index 5d4da714c..d53f3b246 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
@@ -14,19 +14,49 @@
package org.eclipse.osgi.internal.serviceregistry;
-import java.security.*;
-import java.util.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.eclipse.osgi.container.Module;
import org.eclipse.osgi.container.ModuleRevision;
-import org.eclipse.osgi.framework.eventmgr.*;
+import org.eclipse.osgi.framework.eventmgr.CopyOnWriteIdentityMap;
+import org.eclipse.osgi.framework.eventmgr.EventDispatcher;
+import org.eclipse.osgi.framework.eventmgr.ListenerQueue;
import org.eclipse.osgi.internal.debug.Debug;
import org.eclipse.osgi.internal.framework.BundleContextImpl;
import org.eclipse.osgi.internal.framework.EquinoxContainer;
import org.eclipse.osgi.internal.messages.Msg;
import org.eclipse.osgi.storage.BundleInfo.Generation;
import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.framework.hooks.service.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceException;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceObjects;
+import org.osgi.framework.ServicePermission;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.hooks.service.EventHook;
+import org.osgi.framework.hooks.service.EventListenerHook;
+import org.osgi.framework.hooks.service.FindHook;
+import org.osgi.framework.hooks.service.ListenerHook;
import org.osgi.framework.hooks.service.ListenerHook.ListenerInfo;
/**
@@ -97,7 +127,7 @@ public class ServiceRegistry {
publishedServicesByClass = new HashMap<>(initialCapacity);
publishedServicesByContext = new HashMap<>(initialCapacity);
allPublishedServices = new ArrayList<>(initialCapacity);
- serviceEventListeners = new HashMap<>(initialCapacity);
+ serviceEventListeners = new LinkedHashMap<>(initialCapacity);
Module systemModule = container.getStorage().getModuleContainer().getModule(0);
systemBundleContext = (BundleContextImpl) systemModule.getBundle().getBundleContext();
systemBundleContext.provisionServicesInUseMap();
@@ -819,7 +849,7 @@ public class ServiceRegistry {
Set<Map.Entry<ServiceListener, FilteredServiceListener>> systemServiceListenersOrig = null;
BundleContextImpl systemContext = null;
synchronized (serviceEventListeners) {
- listenerSnapshot = new HashMap<>(serviceEventListeners.size());
+ listenerSnapshot = new LinkedHashMap<>(serviceEventListeners.size());
for (Map.Entry<BundleContextImpl, CopyOnWriteIdentityMap<ServiceListener, FilteredServiceListener>> entry : serviceEventListeners.entrySet()) {
Map<ServiceListener, FilteredServiceListener> listeners = entry.getValue();
if (!listeners.isEmpty()) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
index 5da9c8e93..5cfb4215b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
@@ -152,7 +152,7 @@ public class BERProcessor {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
switch (classOfTag) {
case UNIVERSAL_TAGCLASS :
sb.append('U');
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
index 248a2e471..37bc0ec11 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
@@ -59,7 +59,7 @@ public class PKCS7Processor implements SignedContentConstants {
private Date signingTime;
private static String oid2String(int oid[]) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < oid.length; i++) {
if (i > 0)
sb.append('.');
@@ -205,7 +205,7 @@ public class PKCS7Processor implements SignedContentConstants {
// create the appropriate date time string format
// date format could be yyyyMMddHHmmss[.s...]Z or yyyyMMddHHmmssZ
int dotIndex = dateString.indexOf('.');
- StringBuffer dateFormatSB = new StringBuffer("yyyyMMddHHmmss"); //$NON-NLS-1$
+ StringBuilder dateFormatSB = new StringBuilder("yyyyMMddHHmmss"); //$NON-NLS-1$
if (dotIndex != -1) {
// yyyyMMddHHmmss[.s...]Z, find out number of s in the bracket
int noS = dateString.indexOf('Z') - 1 - dotIndex;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
index 63bf5522b..04d6abe02 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignatureBlockProcessor.java
@@ -454,14 +454,14 @@ public class SignatureBlockProcessor implements SignedContentConstants {
private static String stripContinuations(String entry) {
if (entry.indexOf("\n ") < 0 && entry.indexOf("\r ") < 0) //$NON-NLS-1$//$NON-NLS-2$
return entry;
- StringBuffer buffer = new StringBuffer(entry);
+ StringBuilder buffer = new StringBuilder(entry);
removeAll(buffer, "\r\n "); //$NON-NLS-1$
removeAll(buffer, "\n "); //$NON-NLS-1$
removeAll(buffer, "\r "); //$NON-NLS-1$
return buffer.toString();
}
- private static StringBuffer removeAll(StringBuffer buffer, String toRemove) {
+ private static StringBuilder removeAll(StringBuilder buffer, String toRemove) {
int index = buffer.indexOf(toRemove);
int length = toRemove.length();
while (index > 0) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
index 3afa85e77..077ade007 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
@@ -81,7 +81,7 @@ public class ContentHandlerFactoryImpl extends MultiplexingFactory implements ja
convertedContentType = convertedContentType.replace('-', '_');
StringTokenizer tok = new StringTokenizer(builtInHandlers, "|"); //$NON-NLS-1$
while (tok.hasMoreElements()) {
- StringBuffer name = new StringBuffer();
+ StringBuilder name = new StringBuilder();
name.append(tok.nextToken());
name.append("."); //$NON-NLS-1$
name.append(convertedContentType);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
index 204715ffd..d74f030b9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
@@ -66,7 +66,7 @@ public class URLStreamHandlerFactoryImpl extends MultiplexingFactory implements
Class<?> clazz;
StringTokenizer tok = new StringTokenizer(builtInHandlers, "|"); //$NON-NLS-1$
while (tok.hasMoreElements()) {
- StringBuffer name = new StringBuffer();
+ StringBuilder name = new StringBuilder();
name.append(tok.nextToken());
name.append("."); //$NON-NLS-1$
name.append(protocol);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index d4d89cd17..8b985cafe 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -2019,7 +2019,7 @@ public class Storage {
}
public static String sanitizeFilterInput(String filePattern) throws InvalidSyntaxException {
- StringBuffer buffer = null;
+ StringBuilder buffer = null;
boolean foundEscape = false;
for (int i = 0; i < filePattern.length(); i++) {
char c = filePattern.charAt(i);
@@ -2034,7 +2034,7 @@ public class Storage {
case ')' :
if (!foundEscape) {
if (buffer == null) {
- buffer = new StringBuffer(filePattern.length() + 16);
+ buffer = new StringBuilder(filePattern.length() + 16);
buffer.append(filePattern.substring(0, i));
}
// must escape with '\'
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
index 4d8fc7c68..1167b9f45 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
@@ -108,7 +108,7 @@ public class NestedDirBundleFile extends BundleFile {
private String prependNestedDir(String path) {
if (path.length() > 0 && path.charAt(0) == '/')
path = path.substring(1);
- return new StringBuffer(nestedDirName).append(path).toString();
+ return new StringBuilder(nestedDirName).append(path).toString();
}
@Override
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
index b0ada55f0..991f0574b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
@@ -193,7 +193,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
*/
@Override
protected String toExternalForm(URL url) {
- StringBuffer result = new StringBuffer(url.getProtocol());
+ StringBuilder result = new StringBuilder(url.getProtocol());
result.append("://"); //$NON-NLS-1$
String host = url.getHost();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/util/TextProcessor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/util/TextProcessor.java
index 4e6224e6f..69f2e910b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/util/TextProcessor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/util/TextProcessor.java
@@ -171,7 +171,7 @@ public class TextProcessor {
delimiter = delimiter == null ? getDefaultDelimiters() : delimiter;
- StringBuffer target = new StringBuffer();
+ StringBuilder target = new StringBuilder();
target.append(LRE);
char ch;
@@ -240,7 +240,7 @@ public class TextProcessor {
if (!IS_PROCESSING_NEEDED || str == null || str.length() <= 1)
return str;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
switch (c) {
diff --git a/bundles/org.eclipse.osgi/pom.xml b/bundles/org.eclipse.osgi/pom.xml
index c0def9f01..4e05da0d9 100644
--- a/bundles/org.eclipse.osgi/pom.xml
+++ b/bundles/org.eclipse.osgi/pom.xml
@@ -14,12 +14,12 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
- <version>3.15.0-SNAPSHOT</version>
+ <version>3.15.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/bundles/org.eclipse.osgi/supplement/.settings/org.eclipse.pde.api.tools.prefs b/bundles/org.eclipse.osgi/supplement/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..4cec8686b
--- /dev/null
+++ b/bundles/org.eclipse.osgi/supplement/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1 @@
+incompatible_api_component_version=Warning \ No newline at end of file
diff --git a/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
index d067299f4..d59a45de9 100644
--- a/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.supplement
-Bundle-Version: 1.9.0.qualifier
+Bundle-Version: 1.9.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.log;version="1.0",
+Export-Package: org.eclipse.equinox.log;version="1.1",
org.eclipse.osgi.framework.console;version="1.1",
org.eclipse.osgi.framework.eventmgr;version="1.2",
org.eclipse.osgi.framework.log;version="1.1",
diff --git a/bundles/org.eclipse.osgi/supplement/pom.xml b/bundles/org.eclipse.osgi/supplement/pom.xml
index b87d5f724..6b1f0f938 100644
--- a/bundles/org.eclipse.osgi/supplement/pom.xml
+++ b/bundles/org.eclipse.osgi/supplement/pom.xml
@@ -15,13 +15,13 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.supplement</artifactId>
- <version>1.9.0-SNAPSHOT</version>
+ <version>1.9.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
index 76833c7ee..33a2cbf2b 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -19,9 +19,9 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
-import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
@@ -102,12 +102,12 @@ public class ManifestElement {
/**
* The table of attributes for the manifest element.
*/
- private Hashtable<String, Object> attributes;
+ private HashMap<String, Object> attributes;
/**
* The table of directives for the manifest element.
*/
- private Hashtable<String, Object> directives;
+ private HashMap<String, Object> directives;
/**
* Constructs an empty manifest element with no value or attributes.
@@ -260,12 +260,14 @@ public class ManifestElement {
/*
* Return the last value associated with the given key in the specified table.
*/
- private String getTableValue(Hashtable<String, Object> table, String key) {
- if (table == null)
+ private String getTableValue(HashMap<String, Object> table, String key) {
+ if (table == null) {
return null;
+ }
Object result = table.get(key);
- if (result == null)
+ if (result == null) {
return null;
+ }
if (result instanceof String)
return (String) result;
@@ -278,12 +280,14 @@ public class ManifestElement {
/*
* Return the values associated with the given key in the specified table.
*/
- private String[] getTableValues(Hashtable<String, Object> table, String key) {
- if (table == null)
+ private String[] getTableValues(HashMap<String, Object> table, String key) {
+ if (table == null) {
return null;
+ }
Object result = table.get(key);
- if (result == null)
+ if (result == null) {
return null;
+ }
if (result instanceof String)
return new String[] {(String) result};
@SuppressWarnings("unchecked")
@@ -294,10 +298,10 @@ public class ManifestElement {
/*
* Return an enumeration of table keys for the specified table.
*/
- private Enumeration<String> getTableKeys(Hashtable<String, Object> table) {
+ private Enumeration<String> getTableKeys(HashMap<String, Object> table) {
if (table == null)
return null;
- return table.keys();
+ return Collections.enumeration(table.keySet());
}
/*
@@ -306,9 +310,9 @@ public class ManifestElement {
* append the new value to the end of the list.
*/
@SuppressWarnings("unchecked")
- private Hashtable<String, Object> addTableValue(Hashtable<String, Object> table, String key, String value) {
+ private HashMap<String, Object> addTableValue(HashMap<String, Object> table, String key, String value) {
if (table == null) {
- table = new Hashtable<>(7);
+ table = new HashMap<>(7);
}
Object curValue = table.get(key);
if (curValue != null) {
@@ -524,7 +528,8 @@ public class ManifestElement {
}
String header = line.substring(0, colon).trim();
String value = line.substring(colon + 1).trim();
- headers.put(header, value);
+ // intern the header here because they likely have constants for them anyway
+ headers.put(header.intern(), value);
}
} finally {
try {
@@ -589,7 +594,7 @@ public class ManifestElement {
Enumeration<String> directiveKeys = getDirectiveKeys();
if (attrKeys == null && directiveKeys == null)
return mainValue;
- StringBuffer result = new StringBuffer(mainValue);
+ StringBuilder result = new StringBuilder(mainValue);
if (attrKeys != null) {
while (attrKeys.hasMoreElements()) {
String key = attrKeys.nextElement();
@@ -605,7 +610,7 @@ public class ManifestElement {
return result.toString();
}
- private void addValues(boolean directive, String key, String[] values, StringBuffer result) {
+ private void addValues(boolean directive, String key, String[] values, StringBuilder result) {
if (values == null)
return;
for (String value : values) {
diff --git a/features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist b/features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
index d408639c4..86fa6fffb 100644
--- a/features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
+++ b/features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
@@ -6,7 +6,7 @@
<key>CFBundleExecutable</key>
<string>eclipse</string>
<key>CFBundleGetInfoString</key>
- <string>Eclipse 4.13 for Mac OS X, Copyright IBM Corp. and others 2002, 2019. All rights reserved.</string>
+ <string>Eclipse 4.14 for Mac OS X, Copyright IBM Corp. and others 2002, 2019. All rights reserved.</string>
<key>CFBundleIconFile</key>
<string>Eclipse.icns</string>
<key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>4.13</string>
+ <string>4.14</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>4.13</string>
+ <string>4.14</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
diff --git a/features/org.eclipse.equinox.executable.feature/feature.xml b/features/org.eclipse.equinox.executable.feature/feature.xml
index 45984423a..9de9ca0fd 100755
--- a/features/org.eclipse.equinox.executable.feature/feature.xml
+++ b/features/org.eclipse.equinox.executable.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.equinox.executable"
label="%featureName"
- version="3.8.500.qualifier"
+ version="3.8.600.qualifier"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.executable.feature/forceQualifierUpdate.txt b/features/org.eclipse.equinox.executable.feature/forceQualifierUpdate.txt
index 8907b0cbe..82e03740d 100644
--- a/features/org.eclipse.equinox.executable.feature/forceQualifierUpdate.txt
+++ b/features/org.eclipse.equinox.executable.feature/forceQualifierUpdate.txt
@@ -8,3 +8,6 @@ Bug 458346 - Unusual, hard to decipher error in I-build
Bug 492013 - comparator error in I20160419-0800 related to launcher feature
Bug 494151 - Eclipse crashes after displaying splash screen with java.lang.NoClassDefFoundError
Bug 506597 - Build failure on I20161026-2000
+Bug 550714 - Comparator errors in I20190903-1110
+Bug 550674 - Specify hardened runtime for Mac app signing
+Bug 551174 - Comparator errors in 4.14 I build - I20190917-1800
diff --git a/features/org.eclipse.equinox.executable.feature/pom.xml b/features/org.eclipse.equinox.executable.feature/pom.xml
index 5c7e55a3a..ea7602011 100644
--- a/features/org.eclipse.equinox.executable.feature/pom.xml
+++ b/features/org.eclipse.equinox.executable.feature/pom.xml
@@ -14,12 +14,12 @@
<parent>
<artifactId>rt.equinox.framework</artifactId>
<groupId>org.eclipse.equinox.framework</groupId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.equinox.feature</groupId>
<artifactId>org.eclipse.equinox.executable</artifactId>
- <version>3.8.500-SNAPSHOT</version>
+ <version>3.8.600-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
diff --git a/launcher-binary-parent/pom.xml b/launcher-binary-parent/pom.xml
index 0556b1452..cb19c5da3 100644
--- a/launcher-binary-parent/pom.xml
+++ b/launcher-binary-parent/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse.equinox.framework</groupId>
<artifactId>rt.equinox.framework</artifactId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
</parent>
<artifactId>launcher-binary-parent</artifactId>
diff --git a/pom.xml b/pom.xml
index 07ef2d2c9..dd11305dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,13 +15,13 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>eclipse-platform-parent</artifactId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<relativePath>../eclipse-platform-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox.framework</groupId>
<artifactId>rt.equinox.framework</artifactId>
- <version>4.13.0-SNAPSHOT</version>
+ <version>4.14.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>

Back to the top