aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/ResourcesDesc.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/ResourcesDesc.java')
-rw-r--r--netx/net/sourceforge/jnlp/ResourcesDesc.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/netx/net/sourceforge/jnlp/ResourcesDesc.java b/netx/net/sourceforge/jnlp/ResourcesDesc.java
index 4c861b5..42eec01 100644
--- a/netx/net/sourceforge/jnlp/ResourcesDesc.java
+++ b/netx/net/sourceforge/jnlp/ResourcesDesc.java
@@ -75,9 +75,10 @@ public class ResourcesDesc {
public JARDesc getMainJAR() {
JARDesc jars[] = getJARs();
- for (int i = 0; i < jars.length; i++)
- if (jars[i].isMain())
- return jars[i];
+ for (JARDesc jar : jars) {
+ if (jar.isMain())
+ return jar;
+ }
if (jars.length > 0)
return jars[0];
@@ -160,8 +161,7 @@ public class ResourcesDesc {
public Map<String, String> getPropertiesMap() {
Map<String, String> properties = new HashMap<String, String>();
List<PropertyDesc> resources = getResources(PropertyDesc.class);
- for (int i = 0; i < resources.size(); i++) {
- PropertyDesc prop = resources.get(i);
+ for (PropertyDesc prop : resources) {
properties.put(prop.getKey(), prop.getValue());
}
@@ -205,9 +205,10 @@ public class ResourcesDesc {
public <T> List<T> getResources(Class<T> type) {
List<T> result = new ArrayList<T>();
- for (int i = 0; i < resources.size(); i++)
- if (type.isAssignableFrom(resources.get(i).getClass()))
- result.add(type.cast(resources.get(i)));
+ for (Object resource : resources) {
+ if (type.isAssignableFrom(resource.getClass()))
+ result.add(type.cast(resource));
+ }
return result;
}