[classlib][swing] j.s.undo.CompoundEdit.getPresentationName throws NPE
----------------------------------------------------------------------
Key: HARMONY-2603
URL: http://issues.apache.org/jira/browse/HARMONY-2603
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
Code to reproduce:
import java.util.Hashtable;
import javax.swing.undo.CompoundEdit;
import javax.swing.undo.StateEdit;
import javax.swing.undo.StateEditable;
public class Test {
private static StateEdit getStateEdit() {
return new StateEdit(new StateEditable() {
public void storeState(Hashtable arg0) {
}
public void restoreState(Hashtable arg0) {
}
});
}
public static void main(String[] args) {
CompoundEdit ce = new CompoundEdit();
ce.addEdit(getStateEdit());
try {
System.err.println("'" + ce.getPresentationName() + "'");
System.err.println(ce.getPresentationName() == null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
------ end of code ------
=== Harmony output ===
java.lang.NullPointerException
at javax.swing.undo.CompoundEdit.getPresentationName(CompoundEdit.java:111)
at Test.main(Test.java:22)
===================
=== RI output ===
'null'
true
=============
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|