-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta
-
sparc
-
solaris_2.6
Name: aaR10142 Date: 06/26/2000
DefaultTableModel.addColumn(columnName, columnData) docs do not specify behavior for null params.
The method accepts null columnName in jdk1.4,
and throws IllegalArgumentException for it in jdk1.3
Please specify the correct behavior and if it is needed to keep new one,
specify that the behavior was changed.
See example:
------------------example--------------------
import javax.swing.table.DefaultTableModel;
public class Test {
public static void main(String argv[]) {
DefaultTableModel c = new DefaultTableModel();
// add column with null name
c.addColumn(null, new Object[0]);
System.out.println("Accept null");
}
}
-------------------jdk1.3 output ---------------------------
Exception in thread "main" java.lang.IllegalArgumentException: addColumn() - null parameter
at javax.swing.table.DefaultTableModel.addColumn(DefaultTableModel.java:421)
at javax.swing.table.DefaultTableModel.addColumn(DefaultTableModel.java:456)
at Test.main(Test.java:10)
-------------------jdk1.4 output ---------------------------
Accept null
-------------------------------------------------------------
======================================================================