From 27515ddc661c4abc49c6bd5c7e8a9e27f74211f0 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sat, 2 May 2026 21:19:47 -0700 Subject: [PATCH 1/2] Spell-check --- .../plumelib/bcelutil/InstructionListUtils.java | 4 ++-- .../java/org/plumelib/bcelutil/StackMapUtils.java | 14 +++++++------- src/main/java/org/plumelib/bcelutil/StackVer.java | 2 +- .../java/org/plumelib/bcelutil/package-info.java | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/plumelib/bcelutil/InstructionListUtils.java b/src/main/java/org/plumelib/bcelutil/InstructionListUtils.java index 779f9d7a..4ff9217c 100644 --- a/src/main/java/org/plumelib/bcelutil/InstructionListUtils.java +++ b/src/main/java/org/plumelib/bcelutil/InstructionListUtils.java @@ -202,7 +202,7 @@ protected final void insertBeforeHandle( } else if (it instanceof LocalVariableGen lvg) { // If ih is end of local variable range, leave as is. // If ih is start of local variable range and we are - // at the begining of the method go ahead and change + // at the beginning of the method go ahead and change // start to newStart. This is to preserve live range // for variables that are live for entire method. if ((lvg.getStart() == ih) && atStart) { @@ -443,7 +443,7 @@ protected final void replaceInstructions( printIl(newEnd, "replace_inst #1"); - // Move other targets to the new instuctions. + // Move other targets to the new instructions. if (ih.hasTargeters()) { for (InstructionTargeter it : ih.getTargeters()) { if (it instanceof LineNumberGen || it instanceof LocalVariableGen) { diff --git a/src/main/java/org/plumelib/bcelutil/StackMapUtils.java b/src/main/java/org/plumelib/bcelutil/StackMapUtils.java index 8b12e83b..c4638daf 100644 --- a/src/main/java/org/plumelib/bcelutil/StackMapUtils.java +++ b/src/main/java/org/plumelib/bcelutil/StackMapUtils.java @@ -125,7 +125,7 @@ public StackMapUtils() { protected int firstLocalIndex; /** An empty StackMap used for initialization. */ - @SuppressWarnings("interning") // @InternedDistinct initalization with fresh object + @SuppressWarnings("interning") // @InternedDistinct initialization with fresh object private StackMapEntry @InternedDistinct [] emptyStackMapTable = {}; /** @@ -353,7 +353,7 @@ protected final void modifyStackMapsForSwitches(InstructionHandle ih, Instructio return; } - // Make sure all instruction offsets are uptodate. + // Make sure all instruction offsets are up-to-date. il.setPositions(); // Loop through each instruction looking for a switch @@ -747,7 +747,7 @@ protected final LocalVariableGen addNewParameter(MethodGen mgen, String argName, // we need to make a pass over the byte codes to update the local // offset values of all the locals we just shifted up. This may have // a 'knock on' effect if we are forced to change an instruction that - // references implict local #3 to an instruction with an explict + // references implicit local #3 to an instruction with an explicit // reference to local #4 as this would require the insertion of an // offset into the byte codes. This means we would need to make an // additional pass to update branch targets (no - BCEL does this for @@ -843,7 +843,7 @@ protected final LocalVariableGen create_method_scope_local( // Now we need to make a pass over the byte codes to update the local // offset values of all the locals we just shifted up. This may have // a 'knock on' effect if we are forced to change an instruction that - // references implict local #3 to an instruction with an explict + // references implicit local #3 to an instruction with an explicit // reference to local #4 as this would require the insertion of an // offset into the byte codes. This means we would need to make an // additional pass to update branch targets (no - BCEL does this for @@ -884,7 +884,7 @@ protected final LocalVariableGen create_method_scope_local( if (lv.getName().startsWith("DaIkOnTeMp")) { // Remember the index of a compiler temp. We may wish - // to insert our new local prior to a temp to simplfy + // to insert our new local prior to a temp to simplify // the generation of StackMaps. if (compilerTempI == -1) { compilerTempI = i; @@ -978,7 +978,7 @@ protected final LocalVariableGen create_method_scope_local( * @@ -1146,7 +1146,7 @@ protected final int gen_locals(MethodGen mgen, int offset) { InstructionList il = mgen.getInstructionList(); il.setPositions(); - // Set up inital state of StackMap info on entry to method. + // Set up initial state of StackMap info on entry to method. int localsOffsetHeight = 0; int byteCodeOffset = -1; LocalVariableGen newLvg; diff --git a/src/main/java/org/plumelib/bcelutil/StackVer.java b/src/main/java/org/plumelib/bcelutil/StackVer.java index 53f1b02d..deece253 100644 --- a/src/main/java/org/plumelib/bcelutil/StackVer.java +++ b/src/main/java/org/plumelib/bcelutil/StackVer.java @@ -502,7 +502,7 @@ public VerificationResult do_stack_ver(MethodGen mg) { re.printStackTrace(pw); throw new AssertionViolatedException( - "Some RuntimeException occured while verify()ing class '" + "Some RuntimeException occurred while verify()ing class '" + mg.getClassName() + "', method '" + mg diff --git a/src/main/java/org/plumelib/bcelutil/package-info.java b/src/main/java/org/plumelib/bcelutil/package-info.java index 2305e779..66f7dd25 100644 --- a/src/main/java/org/plumelib/bcelutil/package-info.java +++ b/src/main/java/org/plumelib/bcelutil/package-info.java @@ -25,7 +25,7 @@ * other members of the {@code org.apache.bcel.classfile} package and {@link * org.plumelib.bcelutil.BcelUtil} to explore the class file of interest. * - * @see org.plumelib.bcelutil.InstructionListUtils InstructionListUtils for notes on modifing a Java + * @see org.plumelib.bcelutil.InstructionListUtils InstructionListUtils for notes on modifying a Java * class file * @see Commons BCEL web site * for details about the BCEL library From aa56527871d062b802b084ea05ceae61ccfcabd9 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sat, 2 May 2026 21:24:10 -0700 Subject: [PATCH 2/2] Formatting --- src/main/java/org/plumelib/bcelutil/package-info.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/plumelib/bcelutil/package-info.java b/src/main/java/org/plumelib/bcelutil/package-info.java index 66f7dd25..42aca524 100644 --- a/src/main/java/org/plumelib/bcelutil/package-info.java +++ b/src/main/java/org/plumelib/bcelutil/package-info.java @@ -25,8 +25,8 @@ * other members of the {@code org.apache.bcel.classfile} package and {@link * org.plumelib.bcelutil.BcelUtil} to explore the class file of interest. * - * @see org.plumelib.bcelutil.InstructionListUtils InstructionListUtils for notes on modifying a Java - * class file + * @see org.plumelib.bcelutil.InstructionListUtils InstructionListUtils for notes on modifying a + * Java class file * @see Commons BCEL web site * for details about the BCEL library */