|
1 | 1 | /*******************************************************************************
|
2 |
| - * Copyright (c) 2000, 2018 IBM Corporation and others. |
| 2 | + * Copyright (c) 2000, 2025 IBM Corporation and others. |
3 | 3 | *
|
4 | 4 | * This program and the accompanying materials
|
5 | 5 | * are made available under the terms of the Eclipse Public License 2.0
|
@@ -607,9 +607,7 @@ private void addURLToExtraClasspathEntries(URL url, IConfigurationElement elemen
|
607 | 607 | if (eclipseRuntime != null) {
|
608 | 608 | eclipseRuntimeRequired = Boolean.parseBoolean(eclipseRuntime);
|
609 | 609 | }
|
610 |
| - Iterator<AntClasspathEntry> itr = extraClasspathURLs.iterator(); |
611 |
| - while (itr.hasNext()) { |
612 |
| - IAntClasspathEntry entry = itr.next(); |
| 610 | + for (IAntClasspathEntry entry : extraClasspathURLs) { |
613 | 611 | if (entry.getEntryURL().equals(url)) {
|
614 | 612 | return;
|
615 | 613 | }
|
@@ -1063,11 +1061,9 @@ private void addEntryURLs(List<URL> result, IAntClasspathEntry[] entries) {
|
1063 | 1061 |
|
1064 | 1062 | protected ClassLoader[] getPluginClassLoaders() {
|
1065 | 1063 | if (orderedPluginClassLoaders == null) {
|
1066 |
| - Iterator<WrappedClassLoader> classLoaders = pluginClassLoaders.iterator(); |
1067 | 1064 | Map<String, WrappedClassLoader> idToLoader = new HashMap<>(pluginClassLoaders.size());
|
1068 | 1065 | List<BundleRevision> bundles = new ArrayList<>(pluginClassLoaders.size());
|
1069 |
| - while (classLoaders.hasNext()) { |
1070 |
| - WrappedClassLoader loader = classLoaders.next(); |
| 1066 | + for (WrappedClassLoader loader : pluginClassLoaders) { |
1071 | 1067 | idToLoader.put(loader.bundle.getSymbolicName(), loader);
|
1072 | 1068 | BundleRevision revision = loader.bundle.adapt(BundleRevision.class);
|
1073 | 1069 | if (revision != null) {
|
@@ -1281,9 +1277,7 @@ public List<Task> getTasks() {
|
1281 | 1277 | public List<Task> getRemoteTasks() {
|
1282 | 1278 | List<Task> result = new ArrayList<>(10);
|
1283 | 1279 | if (defaultTasks != null && !defaultTasks.isEmpty()) {
|
1284 |
| - Iterator<Task> iter = defaultTasks.iterator(); |
1285 |
| - while (iter.hasNext()) { |
1286 |
| - Task task = iter.next(); |
| 1280 | + for (Task task : defaultTasks) { |
1287 | 1281 | if (!task.isEclipseRuntimeRequired()) {
|
1288 | 1282 | result.add(task);
|
1289 | 1283 | }
|
@@ -1348,9 +1342,7 @@ public List<Property> getProperties() {
|
1348 | 1342 | public List<Property> getRemoteAntProperties() {
|
1349 | 1343 | List<Property> result = new ArrayList<>(10);
|
1350 | 1344 | if (defaultProperties != null && !defaultProperties.isEmpty()) {
|
1351 |
| - Iterator<Property> iter = defaultProperties.iterator(); |
1352 |
| - while (iter.hasNext()) { |
1353 |
| - Property property = iter.next(); |
| 1345 | + for (Property property : defaultProperties) { |
1354 | 1346 | if (!property.isEclipseRuntimeRequired()) {
|
1355 | 1347 | result.add(property);
|
1356 | 1348 | }
|
@@ -1519,9 +1511,7 @@ public List<Type> getTypes() {
|
1519 | 1511 | public List<Type> getRemoteTypes() {
|
1520 | 1512 | List<Type> result = new ArrayList<>(10);
|
1521 | 1513 | if (defaultTypes != null && !defaultTypes.isEmpty()) {
|
1522 |
| - Iterator<Type> iter = defaultTypes.iterator(); |
1523 |
| - while (iter.hasNext()) { |
1524 |
| - Type type = iter.next(); |
| 1514 | + for (Type type : defaultTypes) { |
1525 | 1515 | if (!type.isEclipseRuntimeRequired()) {
|
1526 | 1516 | result.add(type);
|
1527 | 1517 | }
|
|
0 commit comments