| Summary: | SWT.EDGE constant for Browser overlaps with SWT.NO_BACKGROUND | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mikael Sterner <mikaels> |
| Component: | SWT | Assignee: | Niraj Modi <niraj.modi> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | loskutov, nikita, niraj.modi |
| Version: | 4.19 | ||
| Target Milestone: | 4.20 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=538991 https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178840 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=13749c8685a91914b093fa8acab8759c3aa53f31 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 571909 | ||
|
Description
Mikael Sterner
Oh, this is unfortunate. With this constant being part of a stable release I'm not sure if changing it is possible. Anyway, SWT.NO_BACKGROUND isn't a valid style for the Browser widget, so an easy work-around is to simply remove it. Thanks for the analysis. I filed https://github.com/spotbugs/spotbugs/issues/1477 downstream. The Composite documentation clearly says that using NO_BACKGROUND is undefined for other subclasses than Canvas, so I guess it could be considered a latent bug in the SpotBugs code to use it. (In reply to Mikael Sterner from comment #0) > I believe that the implementation for bug 538991 caused a regression for > org.eclipse.swt.browser.Browser instances that use the SWT.NO_BACKGROUND > style, since SWT.EDGE has the same value (1<<18, erroneously listed as 1<<16 > in the javadoc). Good catch, we need to fix this JavaDoc here. Will submit gerrit shortly. New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178840 (In reply to Nikita Nemkin from comment #1) > Oh, this is unfortunate. With this constant being part of a stable release > I'm not sure if changing it is possible. > > Anyway, SWT.NO_BACKGROUND isn't a valid style for the Browser widget, so an > easy work-around is to simply remove it. (In reply to Mikael Sterner from comment #2) > Thanks for the analysis. I filed > https://github.com/spotbugs/spotbugs/issues/1477 downstream. The Composite > documentation clearly says that using NO_BACKGROUND is undefined for other > subclasses than Canvas, so I guess it could be considered a latent bug in > the SpotBugs code to use it. Thanks Nikita/Mikael for sorting this part. Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178840 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=13749c8685a91914b093fa8acab8759c3aa53f31 NO more actions needed form SWT side on this bug, closing. Verified on master using Eclipse Build id: I20210406-1800 |