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

Delombok broken - duplicate shorthand arg defined #1705

Closed
cptwunderlich opened this Issue May 29, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@cptwunderlich

cptwunderlich commented May 29, 2018

Delombok doesn't work anymore, at all, since v1.16.22:

java -jar C:\Users\bm\Downloads\lombok.jar delombok
java.lang.IllegalArgumentException: Both classpath and onlyChanged contain the shorthand c
        at com.zwitserloot.cmdreader.ParseItem.makeShortHandMap(ParseItem.java:156)
        at com.zwitserloot.cmdreader.CmdReader.<init>(CmdReader.java:77)
        at com.zwitserloot.cmdreader.CmdReader.of(CmdReader.java:91)
        at lombok.delombok.Delombok.main(Delombok.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at lombok.delombok.DelombokApp.runApp(DelombokApp.java:55)
        at lombok.core.Main.go(Main.java:128)
        at lombok.core.Main.main(Main.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)

If you look at Delombok.java, both (classpath and onlyChanged have the same shorthand: 'c'.

Suggested fix: Use a different shorthand, e.g., "o", which is not taken yet and create a regression test, which starts Delombok simply without args.

@ketan

This comment has been minimized.

ketan commented May 30, 2018

+1. I'm able to reproduce the same error at my end.

@rspilker rspilker closed this in 6def033 Jun 4, 2018

@rspilker

This comment has been minimized.

Collaborator

rspilker commented Jun 4, 2018

Regression tests are welcome, but we do not have an infrastructure for those yet.

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