Index: src/main/java/common/javax/swing/JMenuBar.java =================================================================== --- src/main/java/common/javax/swing/JMenuBar.java (revision 494382) +++ src/main/java/common/javax/swing/JMenuBar.java (working copy) @@ -117,10 +117,7 @@ : accessibleContext; } - public JMenu getMenu(int index) { - if (index < 0 || index >= getMenuCount()) { - return null; - } + public JMenu getMenu(int index) { Component c = getComponent(index); return (c instanceof JMenu) ? (JMenu) c : null; }