This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 228567

Summary: DefaultOutlineCellRendererTest.testGetTableCellRendererComponent() fails
Product: platform Reporter: Martin Entlicher <mentlicher>
Component: Outline&TreeTableAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal Keywords: TEST
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Martin Entlicher 2013-04-15 12:58:30 UTC
The test of alternate row color fails under JDK 7.

There was a change in DefaultTableCellRenderer:
In JDK 6, the first row (and all even rows) has the alternate color:
Color alternateColor = DefaultLookup.getColor(this,ui,"Table.alternateRowColor");
    if (alternateColor != null && row % 2 == 0)
        background = alternateColor;
In JDK 7, the first row has the default color and all odd rows have the alternate color:
Color alternateColor = DefaultLookup.getColor(this,ui,"Table.alternateRowColor");
    if (alternateColor != null && row % 2 != 0) {
        background = alternateColor;
    }

The test needs to be changed to reflect the changed behavior.
Comment 1 Martin Entlicher 2013-04-16 08:55:41 UTC
Fixed by changeset:   251135:7cd4ccca48bf
http://hg.netbeans.org/core-main/rev/7cd4ccca48bf
Comment 2 Quality Engineering 2013-04-18 02:21:31 UTC
Integrated into 'main-golden', will be available in build *201304172301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7cd4ccca48bf
User: mentlicher@netbeans.org
Log: #228567: Change the behavior to adapt to JDK 7.