Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcel updates #103

Closed
mebigfatguy opened this issue May 28, 2016 · 7 comments
Closed

bcel updates #103

mebigfatguy opened this issue May 28, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@mebigfatguy
Copy link
Contributor

mebigfatguy commented May 28, 2016

I'm not sure where the custom bcel code is for findbugs anymore, but you may want to check your version of Constants.java for these changes... i think they are not included

Index: dev/bcel/src/main/java/org/apache/commons/bcel6/Constants.java

--- dev/bcel/src/main/java/org/apache/commons/bcel6/Constants.java (revision 1745834)
+++ dev/bcel/src/main/java/org/apache/commons/bcel6/Constants.java (revision 1741710)
@@ -1037,10 +1037,6 @@
/** Java VM opcode.
* @see
* Opcode definitions in The Java Virtual Machine Specification
*/

  • public static final short INVOKEDYNAMIC = 186;
  • /** Java VM opcode.
  • * @see
  • * Opcode definitions in The Java Virtual Machine Specification /
    public static final short NEW = 187;
    /
    * Java VM opcode.
  • @see
    @@ -1391,7 +1387,7 @@
    0/dreturn/, 0/areturn/, 0/return/,
    2/getstatic/, 2/putstatic/, 2/getfield/,
    2/putfield/, 2/invokevirtual/, 2/invokespecial/, 2/invokestatic/,
  • 4/invokeinterface/, 4/invokedynamic/, 2/new/,
  • 4/invokeinterface/, UNDEFINED, 2/new/,
    1/newarray/, 2/anewarray/,
    0/arraylength/, 0/athrow/, 2/checkcast/,
    2/instanceof/, 0/monitorenter/,
    @@ -1464,7 +1460,7 @@
    {T_SHORT}/putstatic/, {T_SHORT}/getfield/,
    {T_SHORT}/putfield/, {T_SHORT}/invokevirtual/,
    {T_SHORT}/invokespecial/, {T_SHORT}/invokestatic/,
  • {T_SHORT, T_BYTE, T_BYTE}/invokeinterface/, {T_SHORT, T_BYTE, T_BYTE}/invokedynamic/,
  • {T_SHORT, T_BYTE, T_BYTE}/invokeinterface/, {},
    {T_SHORT}/new/, {T_BYTE}/newarray/,
    {T_SHORT}/anewarray/, {}/arraylength/, {}/athrow/,
    {T_SHORT}/checkcast/, {T_SHORT}/instanceof/,
    @@ -1511,7 +1507,7 @@
    "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn",
    "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield",
    "putfield", "invokevirtual", "invokespecial", "invokestatic",
  • "invokeinterface", "invokedynamic", "new", "newarray", "anewarray",
  • "invokeinterface", ILLEGAL_OPCODE, "new", "newarray", "anewarray",
    "arraylength", "athrow", "checkcast", "instanceof", "monitorenter",
    "monitorexit", "wide", "multianewarray", "ifnull", "ifnonnull",
    "goto_w", "jsr_w", "breakpoint", ILLEGAL_OPCODE, ILLEGAL_OPCODE,
    @@ -1567,7 +1563,7 @@
    UNPREDICTABLE/putstatic/, 1/getfield/, UNPREDICTABLE/putfield/,
    UNPREDICTABLE/invokevirtual/, UNPREDICTABLE/invokespecial/,
    UNPREDICTABLE/invokestatic/,
  • UNPREDICTABLE/invokeinterface/, UNPREDICTABLE/invokedynamic/, 0/new/, 1/newarray/, 1/anewarray/,
  • UNPREDICTABLE/invokeinterface/, UNDEFINED, 0/new/, 1/newarray/, 1/anewarray/,
    1/arraylength/, 1/athrow/, 1/checkcast/, 1/instanceof/, 1/monitorenter/,
    1/monitorexit/, 0/wide/, UNPREDICTABLE/multianewarray/, 1/ifnull/, 1/ifnonnull/,
    0/goto_w/, 0/jsr_w/, 0/breakpoint/, UNDEFINED, UNDEFINED,
    @@ -1623,7 +1619,7 @@
    0/dreturn/, 0/areturn/, 0/return/, UNPREDICTABLE/getstatic/, 0/putstatic/,
    UNPREDICTABLE/getfield/, 0/putfield/, UNPREDICTABLE/invokevirtual/,
    UNPREDICTABLE/invokespecial/, UNPREDICTABLE/invokestatic/,
  • UNPREDICTABLE/invokeinterface/, UNPREDICTABLE/invokedynamic/, 1/new/, 1/newarray/, 1/anewarray/,
  • UNPREDICTABLE/invokeinterface/, UNDEFINED, 1/new/, 1/newarray/, 1/anewarray/,
    1/arraylength/, 1/athrow/, 1/checkcast/, 1/instanceof/, 0/monitorenter/,
    0/monitorexit/, 0/wide/, 1/multianewarray/, 0/ifnull/, 0/ifnonnull/,
    0/goto_w/, 1/jsr_w/, 0/breakpoint/, UNDEFINED, UNDEFINED,
@mebigfatguy
Copy link
Contributor Author

hmm, here is the diff, from the official bcel repo

svn diff -r 1745834:1741710 dev/bcel/src/main/java/org/apache/commons/bcel6

@KengoTODA
Copy link
Contributor

Hi @mebigfatguy, maybe we can try syntax highlighting, here is my result of svn diff -r 1745834:1741710 src/main/java/org/apache/commons/bcel6 from this repository:

Index: src/main/java/org/apache/commons/bcel6/Constants.java
===================================================================
--- src/main/java/org/apache/commons/bcel6/Constants.java   (revision 1745834)
+++ src/main/java/org/apache/commons/bcel6/Constants.java   (revision 1741710)
@@ -1037,10 +1037,6 @@
   /** Java VM opcode.
    * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">
    * Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKEDYNAMIC   = 186;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">
-   * Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short NEW              = 187;
   /** Java VM opcode.
    * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">
@@ -1391,7 +1387,7 @@
     0/*dreturn*/, 0/*areturn*/, 0/*return*/,
     2/*getstatic*/, 2/*putstatic*/, 2/*getfield*/,
     2/*putfield*/, 2/*invokevirtual*/, 2/*invokespecial*/, 2/*invokestatic*/,
-    4/*invokeinterface*/, 4/*invokedynamic*/, 2/*new*/,
+    4/*invokeinterface*/, UNDEFINED, 2/*new*/,
     1/*newarray*/, 2/*anewarray*/,
     0/*arraylength*/, 0/*athrow*/, 2/*checkcast*/,
     2/*instanceof*/, 0/*monitorenter*/,
@@ -1464,7 +1460,7 @@
     {T_SHORT}/*putstatic*/, {T_SHORT}/*getfield*/,
     {T_SHORT}/*putfield*/, {T_SHORT}/*invokevirtual*/,
     {T_SHORT}/*invokespecial*/, {T_SHORT}/*invokestatic*/,
-    {T_SHORT, T_BYTE, T_BYTE}/*invokeinterface*/, {T_SHORT, T_BYTE, T_BYTE}/*invokedynamic*/,
+    {T_SHORT, T_BYTE, T_BYTE}/*invokeinterface*/, {},
     {T_SHORT}/*new*/, {T_BYTE}/*newarray*/,
     {T_SHORT}/*anewarray*/, {}/*arraylength*/, {}/*athrow*/,
     {T_SHORT}/*checkcast*/, {T_SHORT}/*instanceof*/,
@@ -1511,7 +1507,7 @@
     "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn",
     "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield",
     "putfield", "invokevirtual", "invokespecial", "invokestatic",
-    "invokeinterface", "invokedynamic", "new", "newarray", "anewarray",
+    "invokeinterface", ILLEGAL_OPCODE, "new", "newarray", "anewarray",
     "arraylength", "athrow", "checkcast", "instanceof", "monitorenter",
     "monitorexit", "wide", "multianewarray", "ifnull", "ifnonnull",
     "goto_w", "jsr_w", "breakpoint", ILLEGAL_OPCODE, ILLEGAL_OPCODE,
@@ -1567,7 +1563,7 @@
     UNPREDICTABLE/*putstatic*/, 1/*getfield*/, UNPREDICTABLE/*putfield*/,
     UNPREDICTABLE/*invokevirtual*/, UNPREDICTABLE/*invokespecial*/,
     UNPREDICTABLE/*invokestatic*/,
-    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 0/*new*/, 1/*newarray*/, 1/*anewarray*/,
+    UNPREDICTABLE/*invokeinterface*/, UNDEFINED, 0/*new*/, 1/*newarray*/, 1/*anewarray*/,
     1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 1/*monitorenter*/,
     1/*monitorexit*/, 0/*wide*/, UNPREDICTABLE/*multianewarray*/, 1/*ifnull*/, 1/*ifnonnull*/,
     0/*goto_w*/, 0/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
@@ -1623,7 +1619,7 @@
     0/*dreturn*/, 0/*areturn*/, 0/*return*/, UNPREDICTABLE/*getstatic*/, 0/*putstatic*/,
     UNPREDICTABLE/*getfield*/, 0/*putfield*/, UNPREDICTABLE/*invokevirtual*/,
     UNPREDICTABLE/*invokespecial*/, UNPREDICTABLE/*invokestatic*/,
-    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 1/*new*/, 1/*newarray*/, 1/*anewarray*/,
+    UNPREDICTABLE/*invokeinterface*/, UNDEFINED, 1/*new*/, 1/*newarray*/, 1/*anewarray*/,
     1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 0/*monitorenter*/,
     0/*monitorexit*/, 0/*wide*/, 1/*multianewarray*/, 0/*ifnull*/, 0/*ifnonnull*/,
     0/*goto_w*/, 1/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,

@mebigfatguy
Copy link
Contributor Author

thanks

@iloveeclipse
Copy link
Member

@ALL: any idea what changed in 53 class version except the new version number? The current bcel snapshot from findbugs git repo seem to work fine with Java 9 generated classes. BTW, any idea how this snapshot was created and from which commit?

P.S.
I've opened #105 and work on a preliminary Java 9 support. Any hints are welcome (please on #105 for better tracking).

@don-vip
Copy link
Contributor

don-vip commented Jun 5, 2016

@mebigfatguy
Copy link
Contributor Author

I'll happily push any changes to bcel proper. One issue is that Apache
is damn hard to move to modern jdks, so i may need to revert changes
back from 1.8.

On 06/05/2016 06:31 AM, Andrey Loskutov wrote:

@ALL https://github.com/all: any idea what changed in 53 class
version except the new version number? The current bcel snapshot from
findbugs git repo seem to work fine with Java 9 generated classes.
BTW, any idea how this snapshot was created and from which commit?

P.S.
I've opened #105
#105 and work on a
preliminary Java 9 support. Any hints are welcome (please on #105
#105 for better
tracking).


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#103 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAKYsbdh_VHdxW9M4zDoM7WiugugclEqks5qIqWHgaJpZM4IpJ4L.

@iloveeclipse
Copy link
Member

Now that we are using BCEL trunk I think we can close this one as fixed. Feel free to reopen if there is something missing.

@iloveeclipse iloveeclipse self-assigned this Jun 9, 2016
@iloveeclipse iloveeclipse added this to the 3.1.0 milestone Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants