changeset 1615:7599cca4fe5e

6852051: Getting Null Pointer Exception when displaying message for TrayIcon on Opensolaris Reviewed-by: anthony
author dcherepanov
date Thu, 27 Aug 2009 17:04:47 +0400
parents 559fb14d0ae9
children 911a82b4901f
files src/share/classes/java/awt/Component.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Component.java	Thu Aug 27 16:42:55 2009 +0400
+++ b/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();