JDK-8161256: general data in constant pools - Java Issue Tracker
Jul 12, 2016 ... class), nulls, annotation values, and array data. (See JDK-8161250 for an example; there are many more coming in Project Valhalla.) In order ...
Jul 12, 2016 ... class), nulls, annotation values, and array data. (See JDK-8161250 for an example; there are many more coming in Project Valhalla.) In order ...
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.
A DESCRIPTION OF THE PROBLEM : You can create a file that Java's java.io.File class cannot read. 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).