JDK-8057919 - Java Issue Tracker
... string "that represents the original simple name of C, as given in the source code from which this class file was compiled.". That is, it gives the true ...
... string "that represents the original simple name of C, as given in the source code from which this class file was compiled.". That is, it gives the true ...
It's an error in java.lang.String source code which is the same for all JDK distributions.Create String from char array, release dummy char array. String longString = new String(bigCharArray)
FYI - .NET does not allow a string containing a null byte to be used by the file APIs. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - When a file API receives a string to be used as a filename, it should throw an exception if the string contains characters that are illegal in the underlying filesystem's naming rules.
This is because file names are actually byte-arrays in the os but java.io.File takes a String for a file name (which is composed of Unicode characters).
Java SE Subscribers, those using Oracle Cloud Infrastructure, those using Java to run supported Oracle products and customers using legacy Oracle Java SE products e.g Java SE Advanced, should file a Service Request which will connect you directly with Java SE Support specialists.