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! 😳 |
gaul
left a comment
There was a problem hiding this comment.
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.