-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add violations for File, Paths, FileInputStream, FileOutputStream, FileReader and FileWriter #301
Conversation
…king people to switch to java.nio.file.Files.newFileReader in Java 7
…king people to switch to java.nio.file.Files.newBufferedWriter in Java 7
Tests run fine on modern JDKs, but Github Actions fail because they run on JDK 8, as Java 11 tests need JDK 11 to compile...! 🤦♂️ |
I have deliberately replaces some Java 11 violations that would produce a paradox situation now that Java 7 violations are in place: We should definitively not ask people to stick with IO classes in Java 11 when we ask them to switch over to NIO2 already in Java 7! 😳 |
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.
This looks like a good improvement. Could you bump the Java version to 11 in .github/workflows/ci.yml
? This should retain compatibility with older JDKs since maven.compiler.source
is set to 8 in pom.xml
.
Done. 🙂 |
Thank you for your contribution @mkarg! |
Modern applications should switch from NIO API to NIO2 API to allow for improved performance.
Disclaimer: I am part of the I/O performance optimization team at OpenJDK. My intention of the current PR is to evangelize its use, so applications will run more efficient.