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 ba69ce3  [BCEL-323]BCELifier to set major and minor versions (#31)
ba69ce3 is described below

commit ba69ce3ca845de5a2ca0c57ac722e55f98fb4fb0
Author: Tomo Suzuki <suzt...@google.com>
AuthorDate: Wed Jul 10 14:57:44 2019 -0400

    [BCEL-323]BCELifier to set major and minor versions (#31)
    
    * BCELifier to set major and minor versions
    
    * changes.xml
---
 src/changes/changes.xml                           | 1 +
 src/main/java/org/apache/bcel/util/BCELifier.java | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index ac25c9a..975ea33 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -73,6 +73,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action issue="BCEL-322" type="add" dev="ggregory" due-to="Gary 
Gregory">Add constants to org.apache.bcel.Const for Java 14.</action>
       <action issue="BCEL-270" type="fix" dev="ggregory" 
due-to="Alexandru-Constantin Bledea">Calling toString(ConstantPool) on 
InvokeInstruction throws NullPointerException.</action>
       <action issue="BCEL-321" type="add" dev="ggregory" due-to="Tomo 
Suzuki">Refactor subclasses of ClassPathRepository for differences in 
underlying cache.</action>
+      <action issue="BCEL-323" type="fix" dev="ggregory" due-to="Tomo 
Suzuki">org.apache.bcel.util.BCELifier to set major and minor versions.</action>
     </release>
 
     <release version="6.3.1" date="2019-03-20" description="Bug fix release">
diff --git a/src/main/java/org/apache/bcel/util/BCELifier.java 
b/src/main/java/org/apache/bcel/util/BCELifier.java
index cf49d19..f861f7a 100644
--- a/src/main/java/org/apache/bcel/util/BCELifier.java
+++ b/src/main/java/org/apache/bcel/util/BCELifier.java
@@ -108,6 +108,8 @@ public class BCELifier extends 
org.apache.bcel.classfile.EmptyVisitor {
                 + "\", \"" + super_name + "\", " + "\"" + 
clazz.getSourceFileName() + "\", "
                 + printFlags(clazz.getAccessFlags(), FLAGS.CLASS) + ", "
                 + "new String[] { " + inter + " });");
+        _out.println("    _cg.setMajor(" + clazz.getMajor() +");");
+        _out.println("    _cg.setMinor(" + clazz.getMinor() +");");
         _out.println();
         _out.println("    _cp = _cg.getConstantPool();");
         _out.println("    _factory = new InstructionFactory(_cg, _cp);");

Reply via email to