Index: modules/swing/src/test/api/java/common/javax/swing/undo/CompoundEditTest.java
===================================================================
--- modules/swing/src/test/api/java/common/javax/swing/undo/CompoundEditTest.java (revision 485596)
+++ modules/swing/src/test/api/java/common/javax/swing/undo/CompoundEditTest.java (working copy)
@@ -14,10 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/**
- * @author Evgeniya G. Maenkova
- * @version $Revision$
- */
package javax.swing.undo;
import javax.swing.BasicSwingTestCase;
@@ -367,6 +363,24 @@
assertEquals("", ce.getPresentationName());
}
+ /**
+ * Tests that if getPresentationName of the last edit returns
+ * null, the result is empty string.
+ *
+ */
+ // Regression for HARMONY-2603
+ public void testGetPresentationName03() {
+ ce.addEdit(new TestUndoableEdit() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String getPresentationName() {
+ return null;
+ }
+ });
+ assertEquals("", ce.getPresentationName());
+ }
+
@Override
public void testGetRedoPresentationName() {
assertEquals(UIManager.getString("AbstractUndoableEdit.redoText"), ce