-
Notifications
You must be signed in to change notification settings - Fork 44
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
Enabled java9+ compatibility #91
Conversation
Finomosec
commented
Aug 17, 2020
- SignatureChecker: upgraded from ASM5 to ASM7
- ClassFileVisitor: added ability to process Paths (nedded for "jrt:/modules")
- SignatureBuilder: added java version switch (<=8 / >=9) and implemented signature creation for java 9+
- SignatureChecker: upgraded from ASM5 to ASM7 - ClassFileVisitor: added ability to process Paths (nedded for "jrt:/modules") - SignatureBuilder: added java version switch (<=8 / >=9) and implemented signature creation for java 9+
@Finomosec thanks for the pr. There is build failure with travix. Can you reproduce or any idea on it? |
@Override | ||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { | ||
if (file.getFileName().toString().endsWith(".class")) { | ||
process(file.toString(), Files.newInputStream(file)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The InputStream created by Files.newInputStream(...)
has to be closed again because it looks like the process(...)
method does not do that.
It appears the order in which Maybe a solution to this would be to create a |
@olamy do you plan to release this? ❤️ |
Fixes #134 I saw the above error when building a work project that uses animal-sniffer. That work project uses JDK 11 but compiles some modules for JDK 8 and uses animal-sniffer to verify correct JDK 8 api usage. I grepped the animal-sniffer code and found one remaining occurrence of ASM5. After Replacing it with ASM7, and doing a local `mvn clean install` on animal-sniffer, my work project built correctly. Related to this PR: #91
@Finomosec any chance you could address these concerns? |
Yes, i will look into this. |
It should be safe to assume this (at least for Java), see JLS § 13.1 which says:
So the solution proposed above should work; it might not even require a custom comparator when using the Could you then please also address #91 (comment)? |
@Marcono1234 can you please verify @Finomosec's new PR since you raised these concerns? |
@cowwoc, I think these changes should work. I have added some minor review comments. |