|
> ==============================================================================
> --- 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? |
|
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? |
|
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? |
|
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? 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. |
|
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. |
|
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. |
|
Scott Gray wrote:
> 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. Actually, having such a configuration file checked in to the project would be ok with me. Ofbiz uses this module variable pattern all over the project. Adding this suppression just for eclipse users means the rest of us that use other tools have this extra line we have to ignore. I don't think that this hidding warning is actually a problem in ofbiz, because this pattern is so prevalent thru out the code. Does eclipse support projectconfig file inclusion? |
|
On 20/02/2010, at 4:44 PM, Adam Heath wrote:
> Scott Gray wrote: >> 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. > > Actually, having such a configuration file checked in to the project > would be ok with me. > > Ofbiz uses this module variable pattern all over the project. Adding > this suppression just for eclipse users means the rest of us that use > other tools have this extra line we have to ignore. > > I don't think that this hidding warning is actually a problem in > ofbiz, because this pattern is so prevalent thru out the code. > > Does eclipse support projectconfig file inclusion? I understand that module is used everywhere but it isn't hidden that often, there's probably about 50 instances of it currently. I agree that hidden module fields aren't a problem, but other hidden fields could be and that's why I'd prefer not to switch it off. Regards Scott |
| Free forum by Nabble | Edit this page |
