Results for “java array length example code python site:bugs.java.com 1”
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.I have created a more simple example class which demonstrates this behaviour very clearly. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : See bug ID 4637640.
bugs.java.com
Bug ID: JDK-6577648 Fix for 6535356 should be enlarged
In the particular case the parameter is an array so to make a copy was used Arrays.copyOf() method. Because of absence of null verification, there could be a situation when passed reference has null value. Arrays.copyOf() requare length of array as its second argument.