Hi, I have an app here where certain methods of DefaultTableModel are overridden. When dataVector is not initialized in the begin this will result in a NullPointerException in checkSizes().
With this patch this is fixed. However I am pretty new to this code and maybe
there is a better way to solve this.
Please comment.
ChangeLog:
2006-05-30 Robert Schuster <[EMAIL PROTECTED]>
* javax/swing/table/DefaultTableMode.java: Initialize dataVector
field early.
cya
Robert
Index: javax/swing/table/DefaultTableModel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/table/DefaultTableModel.java,v
retrieving revision 1.16
diff -u -r1.16 DefaultTableModel.java
--- javax/swing/table/DefaultTableModel.java 17 May 2006 20:52:05 -0000 1.16
+++ javax/swing/table/DefaultTableModel.java 30 May 2006 18:49:44 -0000
@@ -58,7 +58,7 @@
* Storage for the rows in the table (each row is itself
* a <code>Vector</code>).
*/
- protected Vector dataVector;
+ protected Vector dataVector = new Vector();
/**
* Storage for the column identifiers.
signature.asc
Description: OpenPGP digital signature
