DaGeRe opened a new pull request, #343: URL: https://github.com/apache/commons-io/pull/343
If Strings with a certain size are written to a stream, this fails with an exception on OpenJDK 11. ``` java.lang.NegativeArraySizeException: -1283060862 at java.base/java.lang.StringCoding.encodeUTF8(StringCoding.java:904) at java.base/java.lang.StringCoding.encode(StringCoding.java:449) at java.base/java.lang.String.getBytes(String.java:964) at org.apache.commons.io.IOUtils.write(IOUtils.java:3251) at org.apache.commons.io.FileUtils.writeStringToFile(FileUtils.java:3541) at org.apache.commons.io.FileUtils.writeStringToFile(FileUtils.java:3524) ``` This PR fixes the problem by using a `ByteBuffer` instead `getBytes`. Unfortunately, this increases test time significantly. One workaround would be to disable the test and only enable it if needed - but testing whether big Strings can be written is not possible without handling such a big string. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
