[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#827741: libatk-wrapper-java: File selection dialog not refreshed when changing directory



Control: tags -1 + patch upstream
Control: reassign -1 openjdk-7
Control: clone -1 -2
Control: reassign -2 openjdk-8
Control: clone -1 -3
Control: reassign -3 openjdk-9

Hello,

Raphaël Hertzog, on Mon 20 Jun 2016 14:11:41 +0200, wrote:
> I got a new report of a problem related to libatk-wrapper-java:
> https://bugs.kali.org/view.php?id=3367 
> 
> You can reproduce it with the zaproxy package:

Thanks for the easy reproducer!  This is actually a bug in openjdk.  I
am thus reassigning the bug, and attaching patches for openjdk-{7,8,9}.

Samuel
--- openjdk/jdk/src/share/classes/javax/swing/JList.java
+++ openjdk/jdk/src/share/classes/javax/swing/JList.java
@@ -3371,7 +3371,12 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+		if (ac != null) {
+		    return ac.getAccessibleAction();
+		} else {
+		    return null;
+		}
             }
 
            /**
@@ -3387,15 +3392,30 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- openjdk/jdk/src/share/classes/javax/swing/JTree.java
+++ openjdk/jdk/src/share/classes/javax/swing/JTree.java
@@ -4962,7 +4962,7 @@ public class JTree extends JComponent im
             public AccessibleSelection getAccessibleSelection() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null && isLeaf) {
-                    return getCurrentAccessibleContext().getAccessibleSelection();
+                    return ac.getAccessibleSelection();
                 } else {
                     return this;
                 }
@@ -4977,7 +4977,7 @@ public class JTree extends JComponent im
             public AccessibleText getAccessibleText() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleText();
+                    return ac.getAccessibleText();
                 } else {
                     return null;
                 }
@@ -4992,7 +4992,7 @@ public class JTree extends JComponent im
             public AccessibleValue getAccessibleValue() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleValue();
+                    return ac.getAccessibleValue();
                 } else {
                     return null;
                 }
--- openjdk/jdk/src/share/classes/javax/swing/table/JTableHeader.java
+++ openjdk/jdk/src/share/classes/javax/swing/table/JTableHeader.java
@@ -1083,7 +1083,12 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleAction();
+		} else {
+			return null;
+		}
             }
 
            /**
@@ -1099,15 +1104,30 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleSelection();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleText();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleValue();
+		} else {
+			return null;
+		}
             }
 
 
--- openjdk/jdk/src/share/classes/javax/swing/JTable.java
+++ openjdk/jdk/src/share/classes/javax/swing/JTable.java
@@ -8218,7 +8218,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8240,7 +8245,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8250,7 +8260,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8260,7 +8275,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
@@ -9019,7 +9039,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9041,7 +9066,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9051,7 +9081,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9061,7 +9096,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- openjdk/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
+++ openjdk/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
@@ -6505,7 +6505,7 @@ final public class AccessBridge extends
         public AccessibleSelection getAccessibleSelection() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null && isLeaf) {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                return ac.getAccessibleSelection();
             } else {
                 return this;
             }
@@ -6520,7 +6520,7 @@ final public class AccessBridge extends
         public AccessibleText getAccessibleText() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleText();
+                return ac.getAccessibleText();
             } else {
                 return null;
             }
@@ -6535,7 +6535,7 @@ final public class AccessBridge extends
         public AccessibleValue getAccessibleValue() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                return ac.getAccessibleValue();
             } else {
                 return null;
             }
--- a/jdk/src/share/classes/javax/swing/JList.java
+++ a/jdk/src/share/classes/javax/swing/JList.java
@@ -3371,7 +3371,12 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+		if (ac != null) {
+		    return ac.getAccessibleAction();
+		} else {
+		    return null;
+		}
             }
 
            /**
@@ -3387,15 +3392,30 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- a/jdk/src/share/classes/javax/swing/JTree.java
+++ a/jdk/src/share/classes/javax/swing/JTree.java
@@ -4962,7 +4962,7 @@ public class JTree extends JComponent im
             public AccessibleSelection getAccessibleSelection() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null && isLeaf) {
-                    return getCurrentAccessibleContext().getAccessibleSelection();
+                    return ac.getAccessibleSelection();
                 } else {
                     return this;
                 }
@@ -4977,7 +4977,7 @@ public class JTree extends JComponent im
             public AccessibleText getAccessibleText() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleText();
+                    return ac.getAccessibleText();
                 } else {
                     return null;
                 }
@@ -4992,7 +4992,7 @@ public class JTree extends JComponent im
             public AccessibleValue getAccessibleValue() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleValue();
+                    return ac.getAccessibleValue();
                 } else {
                     return null;
                 }
--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java
+++ a/jdk/src/share/classes/javax/swing/table/JTableHeader.java
@@ -1083,7 +1083,12 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleAction();
+		} else {
+			return null;
+		}
             }
 
            /**
@@ -1099,15 +1104,30 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleSelection();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleText();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleValue();
+		} else {
+			return null;
+		}
             }
 
 
--- a/jdk/src/share/classes/javax/swing/JTable.java
+++ a/jdk/src/share/classes/javax/swing/JTable.java
@@ -8218,7 +8218,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8240,7 +8245,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8250,7 +8260,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8260,7 +8275,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
@@ -9019,7 +9039,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9041,7 +9066,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9051,7 +9081,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9061,7 +9096,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- a/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
+++ a/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
@@ -6505,7 +6505,7 @@ final public class AccessBridge extends
         public AccessibleSelection getAccessibleSelection() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null && isLeaf) {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                return ac.getAccessibleSelection();
             } else {
                 return this;
             }
@@ -6520,7 +6520,7 @@ final public class AccessBridge extends
         public AccessibleText getAccessibleText() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleText();
+                return ac.getAccessibleText();
             } else {
                 return null;
             }
@@ -6535,7 +6535,7 @@ final public class AccessBridge extends
         public AccessibleValue getAccessibleValue() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                return ac.getAccessibleValue();
             } else {
                 return null;
             }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java
+++ a/jdk/src/java.desktop/share/classes/javax/swing/JList.java
@@ -3371,7 +3371,12 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+		if (ac != null) {
+		    return ac.getAccessibleAction();
+		} else {
+		    return null;
+		}
             }
 
            /**
@@ -3387,15 +3392,30 @@ public class JList<E> extends JComponent
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java
+++ a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java
@@ -4962,7 +4962,7 @@ public class JTree extends JComponent im
             public AccessibleSelection getAccessibleSelection() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null && isLeaf) {
-                    return getCurrentAccessibleContext().getAccessibleSelection();
+                    return ac.getAccessibleSelection();
                 } else {
                     return this;
                 }
@@ -4977,7 +4977,7 @@ public class JTree extends JComponent im
             public AccessibleText getAccessibleText() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleText();
+                    return ac.getAccessibleText();
                 } else {
                     return null;
                 }
@@ -4992,7 +4992,7 @@ public class JTree extends JComponent im
             public AccessibleValue getAccessibleValue() {
                 AccessibleContext ac = getCurrentAccessibleContext();
                 if (ac != null) {
-                    return getCurrentAccessibleContext().getAccessibleValue();
+                    return ac.getAccessibleValue();
                 } else {
                     return null;
                 }
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
+++ a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
@@ -1083,7 +1083,12 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleAction();
+		} else {
+			return null;
+		}
             }
 
            /**
@@ -1099,15 +1104,30 @@ public class JTableHeader extends JCompo
             }
 
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleSelection();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleText();
+		} else {
+			return null;
+		}
             }
 
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+			return ac.getAccessibleValue();
+		} else {
+			return null;
+		}
             }
 
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java
+++ a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java
@@ -8218,7 +8218,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8240,7 +8245,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8250,7 +8260,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -8260,7 +8275,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
@@ -9019,7 +9039,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleAction</code>, or <code>null</code>
              */
             public AccessibleAction getAccessibleAction() {
-                return getCurrentAccessibleContext().getAccessibleAction();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleAction();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9041,7 +9066,12 @@ public class JTable extends JComponent i
              *    <code>null</code>
              */
             public AccessibleSelection getAccessibleSelection() {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleSelection();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9051,7 +9081,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleText</code>, or <code>null</code>
              */
             public AccessibleText getAccessibleText() {
-                return getCurrentAccessibleContext().getAccessibleText();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleText();
+                } else {
+                    return null;
+                }
             }
 
             /**
@@ -9061,7 +9096,12 @@ public class JTable extends JComponent i
              * @return the <code>AccessibleValue</code>, or <code>null</code>
              */
             public AccessibleValue getAccessibleValue() {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                AccessibleContext ac = getCurrentAccessibleContext();
+                if (ac != null) {
+		    return ac.getAccessibleValue();
+                } else {
+                    return null;
+                }
             }
 
 
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
+++ a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
@@ -6505,7 +6505,7 @@ final public class AccessBridge extends
         public AccessibleSelection getAccessibleSelection() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null && isLeaf) {
-                return getCurrentAccessibleContext().getAccessibleSelection();
+                return ac.getAccessibleSelection();
             } else {
                 return this;
             }
@@ -6520,7 +6520,7 @@ final public class AccessBridge extends
         public AccessibleText getAccessibleText() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleText();
+                return ac.getAccessibleText();
             } else {
                 return null;
             }
@@ -6535,7 +6535,7 @@ final public class AccessBridge extends
         public AccessibleValue getAccessibleValue() {
             AccessibleContext ac = getCurrentAccessibleContext();
             if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleValue();
+                return ac.getAccessibleValue();
             } else {
                 return null;
             }

Reply to: