6852051: Getting Null Pointer Exception when displaying message for TrayIcon on Opensolaris
authordcherepanov
Thu, 27 Aug 2009 17:04:47 +0400
changeset 3727 43b25dfd1129
parent 3726 d97f7f568e97
child 3728 d4b5b18ac3eb
6852051: Getting Null Pointer Exception when displaying message for TrayIcon on Opensolaris Reviewed-by: anthony
jdk/src/share/classes/java/awt/Component.java
--- a/jdk/src/share/classes/java/awt/Component.java	Thu Aug 27 16:42:55 2009 +0400
+++ b/jdk/src/share/classes/java/awt/Component.java	Thu Aug 27 17:04:47 2009 +0400
@@ -9572,6 +9572,13 @@
                     return comp.getPeer();
                 }
             }
+            // traversing the hierarchy up to the closest HW container;
+            // further traversing may return a component that is not actually
+            // a native sibling of this component and this kind of z-order
+            // request may not be allowed by the underlying system (6852051).
+            if (!cont.isLightweight()) {
+                break;
+            }
 
             indexAbove = cont.getSiblingIndexAbove();
             cont = cont.getContainer();