Skip to content

Commit

Permalink
[Truffle] Follow FindBugs advices.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Apr 22, 2015
1 parent 0b01058 commit f90af5a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -25,6 +25,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

public abstract class ModuleOperations {

Expand Down Expand Up @@ -200,10 +201,9 @@ public static Map<String, InternalMethod> getAllMethods(RubyModule module) {
@TruffleBoundary
public static Map<String, InternalMethod> withoutUndefinedMethods(Map<String, InternalMethod> methods) {
Map<String, InternalMethod> definedMethods = new HashMap<>();
for (String name : methods.keySet()) {
InternalMethod method = methods.get(name);
if (!method.isUndefined()) {
definedMethods.put(name, method);
for (Entry<String, InternalMethod> method : methods.entrySet()) {
if (!method.getValue().isUndefined()) {
definedMethods.put(method.getKey(), method.getValue());
}
}
return definedMethods;
Expand Down

0 comments on commit f90af5a

Please sign in to comment.