On 20/02/2010, at 4:34 PM, Adam Heath wrote:
> Scott Gray wrote:
>> On 20/02/2010, at 4:24 PM, Adam Heath wrote:
>>
>>> Scott Gray wrote:
>>>> On 20/02/2010, at 4:18 PM, Adam Heath wrote:
>>>>
>>>>>> ==============================================================================
>>>>>> ---
>>>>>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
>>>>>> (original)
>>>>>> +++
>>>>>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
>>>>>> Sat Feb 20 22:53:18 2010
>>>>>> @@ -59,9 +59,10 @@
>>>>>> @SuppressWarnings("serial")
>>>>>> public class ModelEntity extends ModelInfo implements
>>>>>> Comparable<ModelEntity>, Serializable {
>>>>>>
>>>>>> + @SuppressWarnings("hiding")
>>>>>> public static final String module = ModelEntity.class.getName();
>>>>> Huh?
>>>> I dunno ask Eclipse, it warned me that ModelEntity.module was hiding
>>>> ModelInfo.module and offered me the opportunity to hide this warning. I
>>>> took that opportunity.
>>> That's wrong. module is used everywhere. Is eclipse so stupid that
>>> it can't allow same-named *static* variables in classes?
>>
>> Eclipse allows it, it's just warning me in case a field is being hidden
>> unintentionally. I have three options:
>> 1. Change my settings to not warn me about these ever
>> 2. Add the suppress warnings annotation wherever a field is intentionally
>> being hidden
>> 3. Put up with the false positives
>>
>> I went for #2 but if it bothers you I can change that approach to something
>> else, I'm not really too worried about it.
>
> 4. Extend eclipse to allow per-project exclusion patterns to be
> registered.
>
> Is there a way to do 4 already? I don't use eclipse.
>
> It seems to me that if eclipse only has this as a global flag, that it
> is severely broken, as each project has it's own policies and
> patterns, and eclipse shouldn't force *all* code to follow the same rules.It allows per project exclusions, I was listing my options for this project. I like being warned where there is a potential for problems but I can do without this one if it bothers you.
smime.p7s
Description: S/MIME cryptographic signature
