byte-buddy: java.lang.VerifyError during class loading (Instruction type does not match stack map)

During maven build some constructors are enhanced using a net.bytebuddy.build.Plugin, the code added to the constructor(s) can be found here

While this works without any issues on my local machine all builds of the travis build (openjdk8/11/14 and oraclejdk11) are not working: During class loading the verifier throws an exception:

java.lang.VerifyError: Instruction type does not match stack map
Exception Details: Location:
    com/github/pfichtner/bytebuddy/pg/_4_no_anno_apt/Person.<init>(Ljava/lang/String;Lcom/github/pfichtner/bytebuddy/pg/_4_no_anno_apt/Person$auxiliary$JNmEMluC;)V @4: aload_2
  Reason:
    Type uninitializedThis (current frame, locals[2]) is not assignable to 'com/github/pfichtner/bytebuddy/pg/_4_no_anno_apt/Person$auxiliary$JNmEMluC' (stack map, locals[2])

(see https://travis-ci.org/github/pfichtner/jsr380-pg)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Using SuperMethodCall.INSTANCE.andThen(MethodDelegation.to(...)) you can add code to the end, but you can also combine them the other way. Note that you cannot access this or field values if you do it before. By using rebasing (the default), the code will be added.