7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE
Reviewed-by: art, ahgross
This commit is contained in:
parent
f28b488994
commit
79a36f32ee
@ -202,7 +202,8 @@ public class XMenuItemPeer implements MenuItemPeer {
|
|||||||
if (target == null) {
|
if (target == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return AWTAccessor.getMenuItemAccessor().getLabel(target);
|
String label = AWTAccessor.getMenuItemAccessor().getLabel(target);
|
||||||
|
return (label == null) ? "" : label;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isTargetEnabled() {
|
boolean isTargetEnabled() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user