Bug 575700 - Simplify creation of Enumerations
Change-Id: I20b91877f4c4da712b08d410061214d6ea4bb036
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.bundles/+/184749
Tested-by: Equinox Bot <equinox-bot@eclipse.org>
Tested-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.equinox.cm/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
index 5e23ef2..29b229b 100644
--- a/bundles/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.equinox.cm
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.5.100.qualifier
Bundle-Activator: org.eclipse.equinox.internal.cm.Activator
Import-Package: org.osgi.framework;version="1.7.0",
org.osgi.service.cm;version="[1.6,1.7)",
diff --git a/bundles/org.eclipse.equinox.cm/pom.xml b/bundles/org.eclipse.equinox.cm/pom.xml
index 2f65fb4..1829968 100644
--- a/bundles/org.eclipse.equinox.cm/pom.xml
+++ b/bundles/org.eclipse.equinox.cm/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.cm</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.5.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationDictionary.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationDictionary.java
index 1f009ea..f46e4a1 100644
--- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationDictionary.java
+++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationDictionary.java
@@ -68,19 +68,7 @@
@Override
public Enumeration<Object> elements() {
- return new Enumeration<Object>() {
- final Iterator<Object> valuesIterator = configurationProperties.values().iterator();
-
- @Override
- public boolean hasMoreElements() {
- return valuesIterator.hasNext();
- }
-
- @Override
- public Object nextElement() {
- return valuesIterator.next();
- }
- };
+ return Collections.enumeration(configurationProperties.values());
}
@Override
@@ -97,19 +85,7 @@
@Override
public Enumeration<String> keys() {
- return new Enumeration<String>() {
- Iterator<String> keysIterator = configurationProperties.keySet().iterator();
-
- @Override
- public boolean hasMoreElements() {
- return keysIterator.hasNext();
- }
-
- @Override
- public String nextElement() {
- return keysIterator.next();
- }
- };
+ return Collections.enumeration(configurationProperties.keySet());
}
@Override
diff --git a/bundles/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
index e8bc281..29e27df 100644
--- a/bundles/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.equinox.jsp.jasper
-Bundle-Version: 1.1.500.qualifier
+Bundle-Version: 1.1.600.qualifier
Bundle-Activator: org.eclipse.equinox.internal.jsp.jasper.Activator
Import-Package: javax.servlet;version="[2.4, 5.0)",
javax.servlet.annotation;version="[2.6, 5.0)";resolution:=optional,
diff --git a/bundles/org.eclipse.equinox.jsp.jasper/pom.xml b/bundles/org.eclipse.equinox.jsp.jasper/pom.xml
index e549107..e8e1be1 100644
--- a/bundles/org.eclipse.equinox.jsp.jasper/pom.xml
+++ b/bundles/org.eclipse.equinox.jsp.jasper/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.jsp.jasper</artifactId>
- <version>1.1.500-SNAPSHOT</version>
+ <version>1.1.600-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java b/bundles/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
index d809abf..a95b489 100644
--- a/bundles/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
+++ b/bundles/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
@@ -17,6 +17,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.Collections;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.StringTokenizer;
@@ -49,17 +50,7 @@
@Override
public Enumeration<URL> findResources(String name) {
- return new Enumeration<URL>() {
- @Override
- public boolean hasMoreElements() {
- return false;
- }
-
- @Override
- public URL nextElement() {
- return null;
- }
- };
+ return Collections.emptyEnumeration();
}
@Override
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
index 66bddb4..b99f2ac 100644
--- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
+++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
@@ -91,23 +91,7 @@
@Override
public Enumeration<Permission> elements() {
- return new Enumeration<Permission>() {
- int cur = 0;
-
- @Override
- public boolean hasMoreElements() {
- return cur < 1;
- }
-
- @Override
- public Permission nextElement() {
- if (cur == 0) {
- cur = 1;
- return allPermission;
- }
- throw new NoSuchElementException();
- }
- };
+ return Collections.enumeration(Collections.singleton(allPermission));
}
};
diff --git a/features/org.eclipse.equinox.compendium.sdk/feature.xml b/features/org.eclipse.equinox.compendium.sdk/feature.xml
index 3dc8f41..96992f1 100644
--- a/features/org.eclipse.equinox.compendium.sdk/feature.xml
+++ b/features/org.eclipse.equinox.compendium.sdk/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.equinox.compendium.sdk"
label="%featureName"
- version="3.22.100.qualifier"
+ version="3.22.200.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.compendium.sdk/pom.xml b/features/org.eclipse.equinox.compendium.sdk/pom.xml
index d6f89b9..a8aea56 100644
--- a/features/org.eclipse.equinox.compendium.sdk/pom.xml
+++ b/features/org.eclipse.equinox.compendium.sdk/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox.feature</groupId>
<artifactId>org.eclipse.equinox.compendium.sdk</artifactId>
- <version>3.22.100-SNAPSHOT</version>
+ <version>3.22.200-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>