Skip to main content

Assertions from JXTreeTable

6 replies [Last post]
osbald
Offline
Joined: 2003-06-13

Just noticed I've started getting assertion errors (NPEs?) from JXTreeTable with the current build :- couldh've been broken for a week or more anyone know what changes to JXTreetable recently that might cause these?

<br />
java.lang.AssertionError<br />
	at org.jdesktop.swingx.JXTreeTable$TreeTableModelAdapter.bind(JXTreeTable.java:1748)<br />
	at org.jdesktop.swingx.JXTreeTable.setModel(JXTreeTable.java:751)<br />
	at javax.swing.JTable.(JTable.java:417)<br />
	at javax.swing.JTable.(JTable.java:357)<br />
	at org.jdesktop.swingx.JXTable.(JXTable.java:389)<br />
	at org.jdesktop.swingx.JXTreeTable.(JXTreeTable.java:178)<br />
	at org.jdesktop.swingx.JXTreeTable.(JXTreeTable.java:155)<br />
	at org.jdesktop.swingx.JXTreeTable.(JXTreeTable.java:141)<br />

- Richard

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Kleopatra

jdnc-interest@javadesktop.org schrieb:
> This assert will always fail. It's not the correct place for it. The assert is fired before line 191 is ever executed. I moved the assert to check immediately after the assignment. All is well.
>

hmm .. a strange definition of "well", with 30+ tests failing

Jeanette

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

kschaefe
Offline
Joined: 2006-06-08

Oops. I, um, modified my experimental version and checked that in. I've removed the experimental pieces and resubmitted only the 552 fix.

Karl

osbald
Offline
Joined: 2003-06-13

before ye ask here's the sample:

[code]
import org.jdesktop.swingx.JXTreeTable;
import javax.swing.*;

public class TreeTableExample {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TreeTableExample();
}
});
}

public TreeTableExample() {
JFrame frame = new JFrame("VisualTest");
JXTreeTable treeTable = new JXTreeTable();
frame.getContentPane().add(treeTable);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
[/code]

Although it's pretty obvious your not running tests with -ea (assertions enabled).

Tsk Tsk

- Richard

osbald
Offline
Joined: 2003-06-13
kschaefe
Offline
Joined: 2006-06-08

This assert will always fail. It's not the correct place for it. The assert is fired before line 191 is ever executed. I moved the assert to check immediately after the assignment. All is well.

Karl

osbald
Offline
Joined: 2003-06-13

yeah it looked pretty simple but I wanted someone who knew the code to look it over don't know how that changed. Might be worth passing the ticket onto Jan to make sure assertions are turned on for testing..

- Richard