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 0ece85f0626e76ba42cf5ce9092e623a6cb25a79 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jun 1 18:40:45 2020 -0400 No silly strings in exception messages. --- src/examples/ClassDumper.java | 2 +- src/examples/Mini/ASTExpr.java | 4 ++-- src/examples/Mini/ASTFunDecl.java | 2 +- src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java | 2 +- .../org/apache/bcel/verifier/structurals/InstConstraintVisitor.java | 2 +- src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/examples/ClassDumper.java b/src/examples/ClassDumper.java index 0c4a18b..1a0ca56 100644 --- a/src/examples/ClassDumper.java +++ b/src/examples/ClassDumper.java @@ -336,7 +336,7 @@ class ClassDumper { attributes[i] = Attribute.readAttribute(file, constant_pool); final long pos2 = file.getStreamPosition(); if ((pos2 - pos1) != (attribute_length + 6)) { - System.out.printf("%nWHOOPS attribute_length: %d pos2-pos1-6: %d pos1: %x(%d) pos2: %x(%d)%n", + System.out.printf("%nattribute_length: %d pos2-pos1-6: %d pos1: %x(%d) pos2: %x(%d)%n", attribute_length, pos2-pos1-6, pos1, pos1, pos2, pos2); } System.out.printf(" "); diff --git a/src/examples/Mini/ASTExpr.java b/src/examples/Mini/ASTExpr.java index 63e87c7..1b01173 100644 --- a/src/examples/Mini/ASTExpr.java +++ b/src/examples/Mini/ASTExpr.java @@ -243,7 +243,7 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan case GT: ASTFunDecl.push(buf, toInt(_body_int + " > " + _body_int2)); break; - default: System.err.println("Ooops"); + default: System.err.println("Unhandled case: " + kind); } } } @@ -282,7 +282,7 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan case NEQ: bh = il.append(new IF_ICMPEQ(null)); ASTFunDecl.pop(2); break; case LT: bh = il.append(new IF_ICMPGE(null)); ASTFunDecl.pop(2); break; case GT: bh = il.append(new IF_ICMPLE(null)); ASTFunDecl.pop(2); break; - default: System.err.println("Ooops"); + default: System.err.println("Unhandled case: " + kind); } switch(kind) { diff --git a/src/examples/Mini/ASTFunDecl.java b/src/examples/Mini/ASTFunDecl.java index eca0e57..c17fe85 100644 --- a/src/examples/Mini/ASTFunDecl.java +++ b/src/examples/Mini/ASTFunDecl.java @@ -333,7 +333,7 @@ public class ASTFunDecl extends SimpleNode implements MiniParserTreeConstants, o for (int j = 0; j < targeters.length; j++) { if ((targets[i] != match[4]) || (targeters[j] != match[2])) { - System.err.println("Ooops: " + e); + System.err.println("Unexpected: " + e); } } } diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java index af6f037..f8fc6e5 100644 --- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java +++ b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java @@ -569,7 +569,7 @@ public final class Pass3aVerifier extends PassVerifier{ indexValid(o, o.getIndex()+1); } catch(final StaticCodeInstructionOperandConstraintException e) { - throw new AssertionViolatedException("OOPS: Does not BCEL handle that? LDC2_W operand has a problem.", e); + throw new AssertionViolatedException("Does not BCEL handle that? LDC2_W operand has a problem.", e); } } 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 5545c7d..09863cc 100644 --- a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java +++ b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java @@ -2869,7 +2869,7 @@ public class InstConstraintVisitor extends EmptyVisitor{ constraintViolated(o, "Expecting a ReturnaddressType in local variable "+o.getIndex()+"."); } if (locals().get(o.getIndex()) == ReturnaddressType.NO_TARGET) { - throw new AssertionViolatedException("Oops: RET expecting a target!"); + throw new AssertionViolatedException("RET expecting a target!"); } // Other constraints such as non-allowed overlapping subroutines are enforced // while building the Subroutines data structure. diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java b/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java index 3254ca4..7247926 100644 --- a/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java +++ b/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java @@ -292,7 +292,7 @@ public class Subroutines{ } } catch(final RuntimeException re) { - throw new AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen object.", re); + throw new AssertionViolatedException("BCEL did not like NULL as a ConstantPoolGen object.", re); } } }