Skip to content

Commit

Permalink
Use advanced for loop in DefaultEntityResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Sep 14, 2023
1 parent 3d269be commit f289eb0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/io/sf/carte/doc/xml/dtd/DefaultEntityResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map.Entry;

Expand Down Expand Up @@ -568,9 +567,7 @@ public InputSource resolveEntity(String name, String publicId, String baseURI, S
}

private String getSystemIdFromPublicId(String publicId) {
Iterator<Entry<String, String>> it = systemIdToPublicId.entrySet().iterator();
while (it.hasNext()) {
Entry<String, String> entry = it.next();
for (Entry<String, String> entry : systemIdToPublicId.entrySet()) {
if (publicId.equals(entry.getValue())) {
return entry.getKey();
}
Expand Down

0 comments on commit f289eb0

Please sign in to comment.