bugs.java.com
Bug ID: JDK-6294060 Use of substring() causes memory leak
It's an error in java.lang.String source code which is the same for all JDK distributions.Extract first char of long String and release long String. String shortString = longString.substring(0,1)