Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364461

Summary: Compile warning in official build
Product: [Eclipse Project] Equinox Reporter: Dani Megert <daniel_megert>
Component: CompendiumAssignee: equinox.compendium-inbox <equinox.compendium-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jwross, tjwatson
Version: 3.8.0 Juno   
Target Milestone: Juno M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dani Megert CLA 2011-11-22 08:18:35 EST
N20111121-2000.

1. WARNING in /src/org/eclipse/equinox/metatype/impl/ObjectClassDefinitionImpl.java
 (at line 166)

@SuppressWarnings("hiding")
Unnecessary @SuppressWarnings("hiding")
Comment 1 John Ross CLA 2011-11-22 09:29:41 EST
This is similar to bug 302375 and bug 300643. The @SuppressWarnings("hiding") is actually necessary because there is, in fact, an instance variable being overridden (intentionally) by a method local one.

If I understand correctly, the 'Unnecessary @SuppressWarnings("hiding")' warning shows up in the build because the related 'Local variable declaration hides another field or variable' compiler setting is ignored there but not in my workspace.

I believe I can fix this by adding "javacWarnings..=-hiding" to the build.properties of the metatype project, correct?
Comment 2 Dani Megert CLA 2011-11-22 11:26:40 EST
(In reply to comment #1)
> This is similar to bug 302375 and bug 300643. The @SuppressWarnings("hiding")
> is actually necessary because there is, in fact, an instance variable being
> overridden (intentionally) by a method local one.
> 
> If I understand correctly, the 'Unnecessary @SuppressWarnings("hiding")'
> warning shows up in the build because the related 'Local variable declaration
> hides another field or variable' compiler setting is ignored there but not in
> my workspace.
> 
> I believe I can fix this by adding "javacWarnings..=-hiding" to the
> build.properties of the metatype project, correct?

yes.
Comment 3 John Ross CLA 2011-11-22 11:35:07 EST
Added javacWarnings..=-hiding to metatype project's build.properties.

http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=34f4c9c7d16399d7a0bcc2afff9c464ed269a70c
Comment 4 Dani Megert CLA 2011-11-23 02:32:40 EST
Marking as fixed as per comment 3.
Comment 5 Dani Megert CLA 2011-11-23 02:32:54 EST
Verified in N20111122-2000.