-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b52
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084529 | emb-9 | Sergey Bylokhov | P4 | Resolved | Fixed | team |
JDK-8086879 | 8u65 | Sergey Bylokhov | P4 | Resolved | Fixed | b01 |
JDK-8078687 | 8u60 | Sergey Bylokhov | P4 | Resolved | Fixed | b14 |
JDK-8138036 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b01 |
JDK-8079982 | emb-8u60 | Sergey Bylokhov | P4 | Resolved | Fixed | team |
A DESCRIPTION OF THE PROBLEM :
The API docs use the following code as example:
----------
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Number(100));
----------
This is a bad example because it creates an instance of Number which is an abstract class. This code will never compile.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected working example code, e.g.
----------
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Integer(100));
----------
ACTUAL -
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Number(100));
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/javax/swing/JFormattedTextField.html
The API docs use the following code as example:
----------
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Number(100));
----------
This is a bad example because it creates an instance of Number which is an abstract class. This code will never compile.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected working example code, e.g.
----------
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Integer(100));
----------
ACTUAL -
JFormattedTextField tf = new JFormattedTextField();
tf.setValue(new Number(100));
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/javax/swing/JFormattedTextField.html
- backported by
-
JDK-8078687 example in JFormattedTextField API docs instantiates abstract class
-
- Resolved
-
-
JDK-8079982 example in JFormattedTextField API docs instantiates abstract class
-
- Resolved
-
-
JDK-8084529 example in JFormattedTextField API docs instantiates abstract class
-
- Resolved
-
-
JDK-8086879 example in JFormattedTextField API docs instantiates abstract class
-
- Resolved
-
-
JDK-8138036 example in JFormattedTextField API docs instantiates abstract class
-
- Resolved
-