This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit 0a5b0ff601161ff8ef43f8b4bcf6cf1e0fe21df1
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon Jun 1 19:19:36 2020 -0400

    Use lambdas.
---
 src/examples/Mini/ASTFunDecl.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/examples/Mini/ASTFunDecl.java 
b/src/examples/Mini/ASTFunDecl.java
index fe509da..682207d 100644
--- a/src/examples/Mini/ASTFunDecl.java
+++ b/src/examples/Mini/ASTFunDecl.java
@@ -289,12 +289,10 @@ public class ASTFunDecl extends SimpleNode implements 
MiniParserTreeConstants, o
         reset();
     }
 
-    private static final InstructionFinder.CodeConstraint my_constraint = new 
InstructionFinder.CodeConstraint() {
-        public boolean checkCode(final InstructionHandle[] match) {
-            final BranchInstruction if_icmp = (BranchInstruction) 
match[0].getInstruction();
-            final GOTO goto_ = (GOTO) match[2].getInstruction();
-            return (if_icmp.getTarget() == match[3]) && (goto_.getTarget() == 
match[4]);
-        }
+    private static final InstructionFinder.CodeConstraint my_constraint = 
match -> {
+        final BranchInstruction if_icmp = (BranchInstruction) 
match[0].getInstruction();
+        final GOTO goto_ = (GOTO) match[2].getInstruction();
+        return (if_icmp.getTarget() == match[3]) && (goto_.getTarget() == 
match[4]);
     };
 
     /**

Reply via email to