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

Consider switching from deprecated 1.x to x in modernizer.xml for java versions #127

Closed
krzyk opened this issue Aug 26, 2021 · 8 comments
Closed

Comments

@krzyk
Copy link
Contributor

krzyk commented Aug 26, 2021

1.x nomenclature for java version has been deprecated long ago, please consider switching to the x.
So 1.7 becomes 7, 1.11 is 11 etc.

@gaul
Copy link
Owner

gaul commented Aug 26, 2021

Can we support both? Would you like to submit a PR for this?

@krzyk
Copy link
Contributor Author

krzyk commented Aug 26, 2021

Why both? It wold make modernizer.xml file a but strange, someone would use 1.8 another one 8, a bit messy.

I'll look into creating PR, just after the one I create right now :)

@krzyk
Copy link
Contributor Author

krzyk commented Aug 26, 2021

I mean, java uses single digit versions since 5 (1.5), do you consider adding violations for <= 1.4?
I prefer to limit choice to allow better error checking.

@gaul
Copy link
Owner

gaul commented Aug 26, 2021

Modernizer has over 100,000 downloads per month. I don't want to create unneeded work for users when upgrading versions. I am happy to support both formats and prefer the modern one in examples though.

@krzyk
Copy link
Contributor Author

krzyk commented Aug 26, 2021

OK, I didn't consider that someone might setup their own file with violations.

@krzyk
Copy link
Contributor Author

krzyk commented Aug 26, 2021

@gaul BTW. Do you have an easier way of getting method signature except using javap from command line? It was a bit cumbersome to do all the required steps (find jar, extract it, find class file, read javap and don't mistake the methods which all have similar names - and I still managed to used the wrong one :).

krzyk added a commit to krzyk/modernizer-maven-plugin that referenced this issue Aug 26, 2021
@gaul
Copy link
Owner

gaul commented Aug 26, 2021

#72 tracks a programmatic approach. Generally I have been writing test cases then using javap to find the correct signature but surely there is a better way.

krzyk added a commit to krzyk/modernizer-maven-plugin that referenced this issue Aug 26, 2021
@krzyk
Copy link
Contributor Author

krzyk commented Aug 26, 2021

Thanks

I added PR that will fix current issue.

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

No branches or pull requests

2 participants