GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — False alarm: METHOD_NO_LONGER_VARARGS · Issue #393 · siom79/japicmp

False alarm: METHOD_NO_LONGER_VARARGS #393

New issue
Copy link
New issue
Copy link
Closed
Closed
False alarm: METHOD_NO_LONGER_VARARGS#393
Copy link

Description

@He-Pin
He-Pin
opened on Apr 21, 2024
Issue body actions

version:
0.20.0

The method is there, so this is a false alarm.

Reproduce progress:

  1. check out netty/netty 4.1 branch
  2. change the japicmp version to 0.20.0
  3. run japicmp check

Thanks for this great plugin, I find this when preparing a pr in: netty/netty#13989

Activity

  1. He-Pin
    changed the title [-]METHOD_NO_LONGER_VARARGS[/-] [+]False alarm: METHOD_NO_LONGER_VARARGS[/+] on Apr 21, 2024
  2. siom79 commented on Apr 21, 2024

    @siom79
    siom79
    on Apr 21, 2024
    Owner
    More actions

    Thanks for reporting.

    The issues looks a bit weird. When debugging, it shows that in this line in the method extractVarargsModifier() the javassist library returns for behavior.getModifiers() the value 9 for the old version and 137 for the new version. And 137 & 128 means, that VARARGS is set in the new version but not in the old one. So from the point of japicmp it seems to be correct.

    But if you compare both class files Unpooled.class, they are identical on each bit. So why does javassist read the value 9 in the old version and 137 in the new version?

    Reacted by He-Pin(kerr)
  3. He-Pin commented on Apr 21, 2024

    @He-Pin
    He-Pin
    on Apr 21, 2024
    Author
    More actions

    Thanks for reporting.

    The issues looks a bit weird. When debugging, it shows that in this line in the method extractVarargsModifier() the javassist library returns for behavior.getModifiers() the value 9 for the old version and 137 for the new version. And 137 & 128 means, that VARARGS is set in the new version but not in the old one. So from the point of japicmp it seems to be correct.

    But if you compare both class files Unpooled.class, they are identical on each bit. So why does javassist read the value 9 in the old version and 137 in the new version?

    Thanks for quick validation this, this maybe bump javasist version in later release ?I'm not an expert on this. But I checked 0.15.7, it works.

  4. siom79
    added 2 commits that reference this issue on Apr 21, 2024

    #393 javassist 3.30.0-GA

    a3c9508

    #393 In case of method with array (byte[]) and varargs array (byte[].…

    7a18ee2
  5. siom79 commented on Apr 21, 2024

    @siom79
    siom79
    on Apr 21, 2024
    Owner
    More actions

    1,5 hours later: There was an issue with matching the corresponding methods in case one method had a byte array as parameter (byte[]) and the other one an array of byte arrays with varargs (byte[]...). The algorithm did falsely match the wrong arguments (treating byte[]... the same as byte[]). Therefore, the code comparing the varargs bit in the modifiers did compare two different methods. :-)

    I have fixed this with the last commit.

    Reacted by He-Pin(kerr)
    Reacted by He-Pin(kerr)
  6. siom79
    closed this as completedon Apr 21, 2024
  7. siom79
    added a commit that references this issue on Apr 21, 2024

    #393 javassist 3.30.2-GA

    369daac
  8. He-Pin commented on Apr 22, 2024

    @He-Pin
    He-Pin
    on Apr 22, 2024
    Author
    More actions

    Thanks, do you plan a newer release soon, I would like to submit a pr in Netty for this.

  9. siom79 commented on Apr 22, 2024

    @siom79
    siom79
    on Apr 22, 2024
    Owner
    More actions

    Released with 0.21.0.

    Reacted by He-Pin(kerr)
    Reacted by He-Pin(kerr)
    Reacted by He-Pin(kerr)
  10. normanmaurer
    added 2 commits that reference this issue on Apr 23, 2024

    Bump japicmp to 0.21.0 (#13995)

    7bbb859

    Bump japicmp to 0.21.0 (#13995)

    7404a68
  11. He-Pin
    added a commit that references this issue on Apr 23, 2024

    Bump japicmp to 0.21.0 (netty#13995)

    68b0e47
  12. normanmaurer
    added a commit that references this issue on Apr 23, 2024

    Bump japicmp to 0.21.0 (#13995) (#13997)

    4379f0b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.