8078408: Java version applet hangs with Voice over turned on
Summary: add null check to fix NPE
Reviewed-by: prr, serb, alexsch
Contributed-by: peter.brunet@oracle.com
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java Tue May 19 21:58:47 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java Tue May 19 20:40:49 2015 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -630,7 +630,7 @@
if (!allowIgnored) {
final AccessibleRole role = context.getAccessibleRole();
- if (role != null && ignoredRoles.contains(roleKey(role))) {
+ if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) {
// Get the child's unignored children.
_addChildren(child, whichChildren, false, childrenAndRoles);
} else {