-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.3.0
-
x86
-
linux
Name: dkC103137 Date: 09/15/2000
The test libs_api_tests/common_2/javax_swing/JColorChooser/JCC_setSelectionModel case Test02 from
testbase_ss is invalid. The testcase expects that SelectionModel will be not null after
setSelectionModel invocation with null parameter:
----------------------------------------------------------------------------------
try {
JFrame jf = new JFrame("setSelectionModel test");
jcc = new JColorChooser();
jcc.setSelectionModel(null);
ColorSelectionModel csm = jcc.getSelectionModel();
System.out.println("getSelectionModel " + csm);
//jcc.setColor(Color.blue);
jf.getContentPane().add(jcc);
jf.setLocation(200,200);
jf.pack();
jf.setVisible(true);
if (csm != null) {
bReturn = true;
} else {
bReturn = false;
System.out.println("Test 2 Failed");
}
} catch (Exception e) {
bReturn = false;
System.out.println ("Unexpected Exception thrown " + e.getMessage());
e.printStackTrace();
}
----------------------------------------------------------------------------------
Probably the author of the test supposed that in this case the SelectionModel should be set to
colorchooser.DefaultColorSelectionModel. But actual result is null in Linux Kestrel and Solaris
Kestrel.
Java2 SE v1.3 API Spec does not specify result of the method invocation in case of null parameter:
----------------------------------------------------------------------------------
public void setSelectionModel(ColorSelectionModel newModel)
Set the model containing the selected color.
Parameters:
newModel - the new ColorSelectionModel object
----------------------------------------------------------------------------------
======================================================================
The test libs_api_tests/common_2/javax_swing/JColorChooser/JCC_setSelectionModel case Test02 from
testbase_ss is invalid. The testcase expects that SelectionModel will be not null after
setSelectionModel invocation with null parameter:
----------------------------------------------------------------------------------
try {
JFrame jf = new JFrame("setSelectionModel test");
jcc = new JColorChooser();
jcc.setSelectionModel(null);
ColorSelectionModel csm = jcc.getSelectionModel();
System.out.println("getSelectionModel " + csm);
//jcc.setColor(Color.blue);
jf.getContentPane().add(jcc);
jf.setLocation(200,200);
jf.pack();
jf.setVisible(true);
if (csm != null) {
bReturn = true;
} else {
bReturn = false;
System.out.println("Test 2 Failed");
}
} catch (Exception e) {
bReturn = false;
System.out.println ("Unexpected Exception thrown " + e.getMessage());
e.printStackTrace();
}
----------------------------------------------------------------------------------
Probably the author of the test supposed that in this case the SelectionModel should be set to
colorchooser.DefaultColorSelectionModel. But actual result is null in Linux Kestrel and Solaris
Kestrel.
Java2 SE v1.3 API Spec does not specify result of the method invocation in case of null parameter:
----------------------------------------------------------------------------------
public void setSelectionModel(ColorSelectionModel newModel)
Set the model containing the selected color.
Parameters:
newModel - the new ColorSelectionModel object
----------------------------------------------------------------------------------
======================================================================
- relates to
-
JDK-4265972 JColorChooser setSelectionModel with param = null problems
- Closed