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 - DefaultOutlineCellRendererTest.testGetTableCellRendererComponent() fails
Summary: DefaultOutlineCellRendererTest.testGetTableCellRendererComponent() fails
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2013-04-15 12:58 UTC by Martin Entlicher
Modified: 2013-04-18 02:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.