You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/21 15:57:31 UTC
svn commit: r1696996 -
/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
Author: sebb
Date: Fri Aug 21 13:57:31 2015
New Revision: 1696996
URL: http://svn.apache.org/r1696996
Log:
FindBugs: use more efficient entrySet iterator
Modified:
commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java?rev=1696996&r1=1696995&r2=1696996&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java Fri Aug 21 13:57:31 2015
@@ -358,8 +358,9 @@ public class InstructionFinder {
map.put("fstore", precompile(Constants.FSTORE_0, Constants.FSTORE_3, Constants.FSTORE));
map.put("astore", precompile(Constants.ASTORE_0, Constants.ASTORE_3, Constants.ASTORE));
// Compile strings
- for (String key : map.keySet()) {
- String value = map.get(key);
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ String key = entry.getKey();
+ String value = entry.getValue();
char ch = value.charAt(1); // Omit already precompiled patterns
if (ch < OFFSET) {
map.put(key, compilePattern(value)); // precompile all patterns