JDK-8057919 - Java Issue Tracker
... for the 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 ...
... for the 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 ...
The behaviour can even be "cloaked" by using java.util.regex classes: Matcher.group() etc. which seem to use substring internally for String extraction. This way it's nearly impossible to detect the memory leak. This behaviour is totally independent of OS, Java Version, VM type etc.
EXPECTED VERSUS ACTUAL BEHAVIOR : The method should return a string that can be passed to KeyStroke.getKeyStroke. My example does this for some keystrokes. I would like a full implementation to be added to the KeyStroke class.
This problem only occurs if a String constructor has been passed a StringBuffer object as a parameter (which causes the StringBuffer's "shared" flag to be set to true) *AND* the StringBuffer's length is later set to zero. The coding error is in the "StringBuffer.setLength()" method.
Add _raw string literals_ to the Java programming language.Other methods will provide finer control over which escapes are translated. There will also be a provision for tools to invert escapes. The following method will also be added to the `String` class: public String escape().
Reading and writing a string from and to a file are common File operations. Currently, java.nio.file.Files already provides methods for the conversion between a byte array and file, as well as a list and file.