| Summary: | SWTGraphics.checkPaint always applies line attributes | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Peter Severin <peter> |
| Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nyssen |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Forgot to mention that besides unnecessary calls to GC this bug also generates heap garbage by creating a new LineAttributes object on each call. Peter, I came across this as well during 3.7 development. Therefore I filed bug #337263, so that in SWT 3.7, LineAttributes does now provide an equals() method. *** This bug has been marked as a duplicate of bug 337263 *** |
Build Identifier: SWTGraphics.checkPaint uses the following optimization to prevent unnecessary GC calls: LineAttributes lineAttributes = currentState.lineAttributes; if (!appliedState.lineAttributes.equals(lineAttributes)) { But since LineAttributes class does not have an equals method the condition always evaluates to true. Reproducible: Always