changeset 5770:32ac225d85f1

7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE Reviewed-by: art, ahgross
author bagiras
date Wed, 25 Jul 2012 19:46:00 +0400
parents bc21b21d8387
children b195c7431fbc e946d8fcbd70
files src/solaris/classes/sun/awt/X11/XMenuItemPeer.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Mon Jul 23 15:51:46 2012 +0400
+++ b/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Wed Jul 25 19:46:00 2012 +0400
@@ -202,7 +202,8 @@
         if (target == null) {
             return "";
         }
-        return AWTAccessor.getMenuItemAccessor().getLabel(target);
+        String label = AWTAccessor.getMenuItemAccessor().getLabel(target);
+        return (label == null) ? "" : label;
     }
 
     boolean isTargetEnabled() {