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.
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. |