Results for “java constructor example string array method object 1 2 sample site:bugs.java.com”
bugs.java.com
Bug ID: JDK-4489146 BigInteger(String, int) does not fail on multiple...
If the String passed to the BigInteger(String, int) constructor begins with "-- " (two minus signs), or "-0-" then a BigInteger object is created even though such a String is badly formatted. Since BigDecimal(String) depends on the above BigInteger constructor, BigDecimal also has...
bugs.java.com
Bug ID: JDK-6294060 Use of substring() causes memory leak
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.
bugs.java.com
Bug ID: JDK-8030126 (ann) Unnecessary String allocation for...
An example enterprise application using web services and annotations showed there is one annotation service namespace and element string duplicated 14,000 times. If we were to avoid duplicating this single string for the service type, we would save 3MB.