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 6e2bd6d  Fix example src/examples/ClassDumper.java 
ClassDumper.processID().
6e2bd6d is described below

commit 6e2bd6d5d5cb233cd2e8b83e69d7980d3589273b
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Sat Jul 6 07:52:29 2019 -0400

    Fix example src/examples/ClassDumper.java ClassDumper.processID().
---
 src/changes/changes.xml       | 1 +
 src/examples/ClassDumper.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 10ee55c..3d54bce 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -69,6 +69,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action                  type="update" dev="ggregory" due-to="Gary 
Gregory">Update tests from JNA 4.5.0 to 5.3.1.</action>
       <action issue="BCEL-317" type="update" dev="ggregory" due-to="Tomo 
Suzuki, Gary Gregory">Pluggable cache for ConstantUtf8.</action>
       <action issue="BCEL-320" type="add" dev="ggregory" due-to="Tomo Suzuki, 
Gary Gregory">Add LruCacheClassPathRepository that can scan many JAR files 
without OutOfMemoryError.</action>
+      <action                  type="update" dev="ggregory" due-to="Gary 
Gregory">Fix example src/examples/ClassDumper.java 
ClassDumper.processID().</action>
     </release>
 
     <release version="6.3.1" date="2019-03-20" description="Bug fix release">
diff --git a/src/examples/ClassDumper.java b/src/examples/ClassDumper.java
index 98b336b..bc2ed20 100644
--- a/src/examples/ClassDumper.java
+++ b/src/examples/ClassDumper.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 
 import javax.imageio.stream.FileImageInputStream;
 
+import org.apache.bcel.Const;
 import org.apache.bcel.Constants;
 import org.apache.bcel.classfile.Attribute;
 import org.apache.bcel.classfile.ClassFormatException;
@@ -111,7 +112,7 @@ class ClassDumper {
      */
     private final void processID () throws IOException, ClassFormatException {
         final int magic = file.readInt();
-        if (magic != Constants.JVM_CLASSFILE_MAGIC) {
+        if (magic != Const.JVM_CLASSFILE_MAGIC) {
             throw new ClassFormatException(file_name + " is not a Java .class 
file");
         }
         System.out.println("Java Class Dump"); 

Reply via email to