JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... This is a problem because Java allows subclass methods to be run from the superclass constructor. // ... An example follows below. public ...
Feb 5, 1997 ... This is a problem because Java allows subclass methods to be run from the superclass constructor. // ... An example follows below. public ...
5.1.11 defines _string conversion_ for primitive types in terms of a wrapper class constructor call followed by a 'toString' call. The wrapper class constructors are now deprecated for removal, and JLS should not depend on them.
You could also use annotations to control what the name of the MBean is, for example ... String getFoo() {...} @MBeanNameKey("bar") public int getBar ...
Sep 7, 2004 ... ... constructor instead menuItem.setAccelerator(KeyStroke.getKeyStroke ... */ protected static ImageIcon createImageIcon(String path) { java ...
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.
For example, "static Integer Integer.valueOf(String)" fits this pattern and is indeed a static factory. What surprised me was how extensive static factories are used in the JDK. Integer doesn't just have a static factory, for example; it has six
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.Example: import java.math.BigInteger; public class BigIntegerTest { static BigInteger bi