Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java')
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
index 600fb6958..558afa417 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -249,8 +249,9 @@ final class StateReader {
if (hostSpec != null) {
BundleDescription[] hosts = hostSpec.getHosts();
if (hosts != null) {
- for (int i = 0; i < hosts.length; i++)
- ((BundleDescriptionImpl) hosts[i]).addDependency(result, false);
+ for (BundleDescription host : hosts) {
+ ((BundleDescriptionImpl) host).addDependency(result, false);
+ }
}
}
// the rest is lazy loaded data
@@ -612,8 +613,7 @@ final class StateReader {
Map<String, Object> mapAttrs = readMap(in);
Dictionary<String, Object> attrs = new Hashtable<>();
if (mapAttrs != null) {
- for (Iterator<String> keys = mapAttrs.keySet().iterator(); keys.hasNext();) {
- String key = keys.next();
+ for (String key : mapAttrs.keySet()) {
attrs.put(key, mapAttrs.get(key));
}
}

Back to the top