Re: [Codenarc-user] GrailsStatelessService - bean properties and dependencies
Brought to you by:
chrismair
From: Roshan D. <ros...@gm...> - 2011-12-15 16:55:37
|
On Thu, Dec 15, 2011 at 10:16 PM, <chr...@we...> wrote: > >> It will be unfortunate to disable the rule because it cannot anyhow > handle bean depedencies and bean properties. **** > > ** ** > > Agreed.**** > > ** ** > > What about enhancing the rule to ignore fields that are declared as “def” > (i.e., java.lang.Object), public, and with no initialized value. Would that > be appropriate? > ignoring fields with "no initialized value" seems like a good idea to me. It should help with fields that are tied to Spring - injected or pulled in afterPropertiesSet(), etc. > Can you think of any better way to determine whether a field is injected? > Spring 3.x also has this annotation called @Inject. I won't mind flagging my dependency fields as @Inject, but I don't know how closely CodeNarc wants to be tied with a new-ish Spring version. |