Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-01-24 16:02:41 +0000
committerAlexander Kurtakov2019-01-24 16:02:41 +0000
commit1c3ca56bdec0bdc2882af41c81b0491a9551deed (patch)
tree2dbe0a0aab1e787a5ce6ddca7b961d89f14f6c4b
parent64a8aedde1d4b1e2edaa20e055c9e18eeb5fb22c (diff)
downloadrt.equinox.p2-1c3ca56bdec0bdc2882af41c81b0491a9551deed.tar.gz
rt.equinox.p2-1c3ca56bdec0bdc2882af41c81b0491a9551deed.tar.xz
rt.equinox.p2-1c3ca56bdec0bdc2882af41c81b0491a9551deed.zip
Revert stringPropertyNames usage in frameworkadming
Commits e8dbcc1f420471e3e4a5e8a73adf54ade5633e8d and 6098173f6ac7f3444d21074eab6d791db8646ad6 started using them but they ignore non string values so revert to be on the safe side. Change-Id: I329033a51f95f10991fd7f55b27c1bbc3d4590c3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java9
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java6
2 files changed, 9 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
index a81e80cfd..e7878e904 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
@@ -49,7 +49,8 @@ public class Utils {
// printoutProperties(System.out, "to", to);
// printoutProperties(System.out, "from", from);
- for (String key : from.stringPropertyNames()) {
+ for (Enumeration<Object> enumeration = from.keys(); enumeration.hasMoreElements();) {
+ String key = (String) enumeration.nextElement();
to.setProperty(key, from.getProperty(key));
}
}
@@ -336,7 +337,8 @@ public class Utils {
return;
}
ps.println("Props(" + name + ")="); //$NON-NLS-1$ //$NON-NLS-2$
- for (String key : props.stringPropertyNames()) {
+ for (Enumeration<Object> enumeration = props.keys(); enumeration.hasMoreElements();) {
+ String key = (String) enumeration.nextElement();
ps.print("\tkey=" + key); //$NON-NLS-1$
ps.println("\tvalue=" + props.getProperty(key)); //$NON-NLS-1$
}
@@ -407,7 +409,8 @@ public class Utils {
}
StringBuilder sb = new StringBuilder();
sb.append("Props(" + name + ") is \n"); //$NON-NLS-1$ //$NON-NLS-2$
- for (String key : props.stringPropertyNames()) {
+ for (Enumeration<Object> enumeration = props.keys(); enumeration.hasMoreElements();) {
+ String key = (String) enumeration.nextElement();
sb.append("\tkey=" + key + "\tvalue=" + props.getProperty(key) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return sb.toString();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
index d0220cf3c..998cf8217 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
@@ -14,8 +14,7 @@
package org.eclipse.equinox.internal.provisional.frameworkadmin;
-import java.util.LinkedHashSet;
-import java.util.Properties;
+import java.util.*;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
/**
@@ -167,7 +166,8 @@ public class ConfigData {
private static void setPropsStrings(StringBuilder sb, Properties props) {
if (props.size() > 0) {
sb.append("\n"); //$NON-NLS-1$
- for (String key : props.stringPropertyNames()) {
+ for (Enumeration<Object> enumeration = props.keys(); enumeration.hasMoreElements();) {
+ String key = (String) enumeration.nextElement();
String value = props.getProperty(key);
if (value == null || value.equals("")) //$NON-NLS-1$
continue;

Back to the top