JDK-6997384 : Compilation Error in test\javax\swing\JMenuItem\6458123\bug6458123.java
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u23
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-03
  • Updated: 2011-02-16
  • Resolved: 2010-11-17
Related Reports
Duplicate :  
Relates :  
Description
Could not compile the regression test test\javax\swing\JMenuItem\6458123\bug6458123.java getting the following errors

bug6458123.java:197: ';' expected
         Icon arrowIcon = (Icon) getF, arrowIcon, viewRect, gap, accDelimiter, i
sLeftToRight, mi.getFont(), accFont, useCheckAndArrow, propertyPrefix);

looking at the 7ws version http://closedjdk.sfbay.sun.com/jdk7/swing/jdk/test/closed/javax\swing\JMenuItem\6458123\bug6458123.java looks like portion of the code between the missing tags is not there in the 6u23 repo.   


    private MenuItemLayoutHelper createBasicLayoutHelper(JMenuItem mi) {
        BasicMenuItemUI ui = (BasicMenuItemUI) mi.getUI();
        Icon checkIcon = (Icon) getField(ui, "checkIcon");
        Icon arrowIcon = (Icon) getF
----------------------------------------
<missing>

ield(ui, "arrowIcon");
        Rectangle viewRect = new Rectangle(mi.getSize());
        int gap = defaultGap(mi);
        String accDelimiter = (String) getField(ui, "acceleratorDelimiter");
        boolean isLeftToRight = mi.getComponentOrientation().isLeftToRight();
        Font accFont = (Font) getField(ui, "acceleratorFont");
        boolean useCheckAndArrow = MenuItemLayoutHelper.useCheckAndArrow(mi);
        String propertyPrefix = getPropertyPrefix(ui);

        return new MenuItemLayoutHelper(mi, checkIcon

</missing>
---------------------------

,arrowIcon, viewRect,
                gap, accDelimiter, isLeftToRight, mi.getFont(), accFont,
                useCheckAndArrow, propertyPrefix
        );
    }

Comments
EVALUATION Indeed, the test was incorrectly backported, assigned to the engineer who did the backport
08-11-2010