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


The following commit(s) were added to refs/heads/master by this push:
     new 395a6dbb Javadoc
395a6dbb is described below

commit 395a6dbb14bc699604bfbbcaf4ec1fa2d9b91532
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Nov 5 13:37:02 2025 -0500

    Javadoc
---
 .../org/apache/bcel/util/InstructionFinder.java    | 27 ++++---
 .../bcel/verifier/statics/Pass1Verifier.java       | 88 +++++++++++-----------
 2 files changed, 57 insertions(+), 58 deletions(-)

diff --git a/src/main/java/org/apache/bcel/util/InstructionFinder.java 
b/src/main/java/org/apache/bcel/util/InstructionFinder.java
index 974b1bd9..370045ea 100644
--- a/src/main/java/org/apache/bcel/util/InstructionFinder.java
+++ b/src/main/java/org/apache/bcel/util/InstructionFinder.java
@@ -40,23 +40,21 @@ import org.apache.commons.lang3.StringUtils;
  *
  * <p>
  * This class internally uses the java.util.regex package to search for 
regular expressions.
- *
+ * </p>
+ * <p>
  * A typical application would look like this:
- *
+ * </p>
  * <pre>
- *
- *
- *   InstructionFinder f   = new InstructionFinder(il);
- *   String            pat = &quot;IfInstruction ICONST_0 GOTO ICONST_1 NOP 
(IFEQ|IFNE)&quot;;
+ *   InstructionFinder f = new InstructionFinder(il);
+ *   String pat = &quot;IfInstruction ICONST_0 GOTO ICONST_1 NOP 
(IFEQ|IFNE)&quot;;
  *
  *   for (Iterator i = f.search(pat, constraint); i.hasNext(); ) {
- *   InstructionHandle[] match = (InstructionHandle[])i.next();
- *   ...
- *   il.delete(match[1], match[5]);
- *   ...
+ *       InstructionHandle[] match = (InstructionHandle[])i.next();
+ *       ...
+ *       il.delete(match[1], match[5]);
+ *       ...
  *   }
- *
- *
+
  * </pre>
  *
  * @see org.apache.bcel.generic.Instruction
@@ -318,9 +316,9 @@ public class InstructionFinder {
      * pattern.
      *
      * For the rest the usual pattern matching rules for regular expressions 
apply.
-     * <P>
+     * <p>
      * Example pattern:
-     *
+     * </p>
      * <pre>
      * search(&quot;BranchInstruction NOP ((IfInstruction|GOTO)+ ISTORE 
Instruction)*&quot;);
      * </pre>
@@ -328,6 +326,7 @@ public class InstructionFinder {
      * <p>
      * If you alter the instruction list upon a match such that other matching 
areas are affected, you should call reread()
      * to update the finder and call search() again, because the matches are 
cached.
+     * </p>
      *
      * @param pattern the instruction pattern to search for, where case is 
ignored
      * @param from where to start the search in the instruction list
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java 
b/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
index de3a3339..b08ff7aa 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
@@ -61,62 +61,62 @@ public final class Pass1Verifier extends PassVerifier {
      * a class file as long as its resolution is not requested; whereas pass 
two and pass three are performed during the
      * resolution process. Only four constraints to be checked are explicitly 
stated by The Java Virtual Machine
      * Specification, 2nd edition:
-     * <UL>
-     * <LI>The first four bytes must contain the right magic number 
(0xCAFEBABE).
-     * <LI>All recognized attributes must be of the proper length.
-     * <LI>The class file must not be truncated or have extra bytes at the end.
-     * <LI>The constant pool must not contain any superficially unrecognizable 
information.
-     * </UL>
-     * A more in-depth documentation of what pass one should do was written by 
<A HREF=mailto:[email protected]>Philip W. L.
-     * Fong</A>:
-     * <UL>
-     * <LI>the file should not be truncated.
-     * <LI>the file should not have extra bytes at the end.
-     * <LI>all variable-length structures should be well-formatted:
-     * <UL>
-     * <LI>there should only be constant_pool_count-1 many entries in the 
constant pool.
-     * <LI>all constant pool entries should have size the same as indicated by 
their type tag.
-     * <LI>there are exactly interfaces_count many entries in the interfaces 
array of the class file.
-     * <LI>there are exactly fields_count many entries in the fields array of 
the class file.
-     * <LI>there are exactly methods_count many entries in the methods array 
of the class file.
-     * <LI>there are exactly attributes_count many entries in the attributes 
array of the class file, fields, methods, and
+     * <ul>
+     * <li>The first four bytes must contain the right magic number 
(0xCAFEBABE).
+     * <li>All recognized attributes must be of the proper length.
+     * <li>The class file must not be truncated or have extra bytes at the end.
+     * <li>The constant pool must not contain any superficially unrecognizable 
information.
+     * </ul>
+     * A more in-depth documentation of what pass one should do was written by 
<a HREF=mailto:[email protected]>Philip W. L.
+     * Fong</a>:
+     * <ul>
+     * <li>the file should not be truncated.
+     * <li>the file should not have extra bytes at the end.
+     * <li>all variable-length structures should be well-formatted:
+     * <ul>
+     * <li>there should only be constant_pool_count-1 many entries in the 
constant pool.
+     * <li>all constant pool entries should have size the same as indicated by 
their type tag.
+     * <li>there are exactly interfaces_count many entries in the interfaces 
array of the class file.
+     * <li>there are exactly fields_count many entries in the fields array of 
the class file.
+     * <li>there are exactly methods_count many entries in the methods array 
of the class file.
+     * <li>there are exactly attributes_count many entries in the attributes 
array of the class file, fields, methods, and
      * code attribute.
-     * <LI>there should be exactly attribute_length many bytes in each 
attribute. Inconsistency between attribute_length and
+     * <li>there should be exactly attribute_length many bytes in each 
attribute. Inconsistency between attribute_length and
      * the actually size of the attribute content should be uncovered. For 
example, in an Exceptions attribute, the actual
      * number of exceptions as required by the number_of_exceptions field 
might yeild an attribute size that doesn't match
      * the attribute_length. Such an anomaly should be detected.
-     * <LI>all attributes should have proper length. In particular, under 
certain context (for example while parsing method_info),
+     * <li>all attributes should have proper length. In particular, under 
certain context (for example while parsing method_info),
      * recognizable attributes (for example "Code" attribute) should have 
correct format (for example attribute_length is 2).
-     * </UL>
-     * <LI>Also, certain constant values are checked for validity:
-     * <UL>
-     * <LI>The magic number should be 0xCAFEBABE.
-     * <LI>The major and minor version numbers are valid.
-     * <LI>All the constant pool type tags are recognizable.
-     * <LI>All undocumented access flags are masked off before use. Strictly 
speaking, this is not really a check.
-     * <LI>The field this_class should point to a string that represents a 
legal non-array class name, and this name should
+     * </ul>
+     * <li>Also, certain constant values are checked for validity:
+     * <ul>
+     * <li>The magic number should be 0xCAFEBABE.
+     * <li>The major and minor version numbers are valid.
+     * <li>All the constant pool type tags are recognizable.
+     * <li>All undocumented access flags are masked off before use. Strictly 
speaking, this is not really a check.
+     * <li>The field this_class should point to a string that represents a 
legal non-array class name, and this name should
      * be the same as the class file being loaded.
-     * <LI>the field super_class should point to a string that represents a 
legal non-array class name.
-     * <LI>Because some of the above checks require cross referencing the 
constant pool entries, guards are set up to make
+     * <li>the field super_class should point to a string that represents a 
legal non-array class name.
+     * <li>Because some of the above checks require cross referencing the 
constant pool entries, guards are set up to make
      * sure that the referenced entries are of the right type and the indices 
are within the legal range (0 &lt; index &lt;
      * constant_pool_count).
-     * </UL>
-     * <LI>Extra checks done in pass 1:
-     * <UL>
-     * <LI>the constant values of static fields should have the same type as 
the fields.
-     * <LI>the number of words in a parameter list does not exceed 255 and 
locals_max.
-     * <LI>the name and signature of fields and methods are verified to be of 
legal format.
-     * </UL>
-     * </UL>
-     * (From the Paper <A 
href="https://www.cs.sfu.ca/people/GradStudents/pwfong/personal/JVM/pass1/";> 
The Mysterious Pass
-     * One, first draft, September 2, 1997</A>.)
+     * </ul>
+     * <li>Extra checks done in pass 1:
+     * <ul>
+     * <li>the constant values of static fields should have the same type as 
the fields.
+     * <li>the number of words in a parameter list does not exceed 255 and 
locals_max.
+     * <li>the name and signature of fields and methods are verified to be of 
legal format.
+     * </ul>
+     * </ul>
+     * (From the Paper <a 
href="https://www.cs.sfu.ca/people/GradStudents/pwfong/personal/JVM/pass1/";> 
The Mysterious Pass
+     * One, first draft, September 2, 1997</a>.)
      *
-     * <P>
+     * <p>
      * However, most of this is done by parsing a class file or generating a 
class file into BCEL's internal data structure.
-     * <B>Therefore, all that is really done here is look up the class file 
from BCEL's repository.</B> This is also
+     * <strong>Therefore, all that is really done here is look up the class 
file from BCEL's repository.</strong> This is also
      * motivated by the fact that some omitted things (like the check for 
extra bytes at the end of the class file) are
      * handy when actually using BCEL to repair a class file (otherwise you 
would not be able to load it into BCEL).
-     * </P>
+     * </p>
      *
      * @see org.apache.bcel.Repository
      * @see org.apache.bcel.Const#JVM_CLASSFILE_MAGIC

Reply via email to