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

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


The following commit(s) were added to refs/heads/master by this push:
     new c4e7b29a Reduce the copy-pasta fiesta.
c4e7b29a is described below

commit c4e7b29a5b5a9e2b2b0d62da0cb68800d84103f4
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jul 15 13:54:10 2026 -0400

    Reduce the copy-pasta fiesta.
---
 .../org/apache/bcel/verifier/structurals/InstConstraintVisitor.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java 
b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
index 91505840..d50f902e 100644
--- 
a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
+++ 
b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
@@ -434,7 +434,6 @@ public class InstConstraintVisitor extends EmptyVisitor {
         final Type arrayref = stack().peek(2);
         final Type index = stack().peek(1);
         final Type value = stack().peek(0);
-
         indexOfInt(o, index);
         if (!(value instanceof ReferenceType)) {
             constraintViolated(o, "The 'value' is not of a ReferenceType but 
of type " + value + ".");
@@ -982,10 +981,7 @@ public class InstConstraintVisitor extends EmptyVisitor {
      */
     @Override
     public void visitFASTORE(final FASTORE o) {
-        final Type peek = stack().peek();
-        if (peek != Type.FLOAT) {
-            constraintViolated(o, "The value at the stack top is not of type 
'float', but of type '" + peek + "'.");
-        }
+        checkTypeFloatConstraint(o, 0);
         indexOfInt(o, stack().peek(1));
         checkArrayElementType(Type.FLOAT, o, stack().peek(2));
     }

Reply via email to