Skip to content

Commit f90af5a

Browse files
committed
[Truffle] Follow FindBugs advices.
1 parent 0b01058 commit f90af5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

truffle/src/main/java/org/jruby/truffle/runtime/ModuleOperations.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import java.util.HashMap;
2727
import java.util.Map;
28+
import java.util.Map.Entry;
2829

2930
public abstract class ModuleOperations {
3031

@@ -200,10 +201,9 @@ public static Map<String, InternalMethod> getAllMethods(RubyModule module) {
200201
@TruffleBoundary
201202
public static Map<String, InternalMethod> withoutUndefinedMethods(Map<String, InternalMethod> methods) {
202203
Map<String, InternalMethod> definedMethods = new HashMap<>();
203-
for (String name : methods.keySet()) {
204-
InternalMethod method = methods.get(name);
205-
if (!method.isUndefined()) {
206-
definedMethods.put(name, method);
204+
for (Entry<String, InternalMethod> method : methods.entrySet()) {
205+
if (!method.getValue().isUndefined()) {
206+
definedMethods.put(method.getKey(), method.getValue());
207207
}
208208
}
209209
return definedMethods;

0 commit comments

Comments
 (0)