Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364461 - Compile warning in official build
Summary: Compile warning in official build
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.8.0 Juno   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: Juno M4   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 08:18 EST by Dani Megert CLA
Modified: 2012-05-24 13:42 EDT (History)
2 users (show)

See Also:


Attachments

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