I just came across this old message (from 27/5) in the archive, that I
missed first time round... it's only by chance I spotted it, else it
might never have been fixed :-(
*Please* raise any bugs etc. in the SF trackers, if they're only mentioned
on the lists they're likely to be overlooked, like this one almost was.
(I've opened a bug for this one now.)
Andrew.
A wise old hermit known only as Andreas Werner <[EMAIL PROTECTED]>
once said:
> Hi,
>
> i think i found a little bug.
> If i try to define a setter method within my bean and i let
> xDoclet generate a dao-call method, the call is always generated as
> following, even if the return value of the method was void!
> The resulting code won't compile because of the return statement.
>
> Abstract bean method:
> /**
> * @dao.call
> * @param teams
> */
> public abstract void setTeams(Collection teams);
>
> Generated code:
> public void setTeams(Collection teams)
> {
>
> return getDAO().doSomething(some Parameters);
>
> }
>
> I had a short look at the template code, and found that dao-calls will
> always return something. I searched for a Tag like ifIsGetter but found
> none, such a tag should be sufficient to fix the above problem.
>
>
> But i also found a little workaround using an additional method:
>
> /**
> * @param teams
> * TODO: Check if there is a bug in xDoclet.
> */
> public void setTeams( Collection teams ) {
> // Because of bug in xDoclet when defining dao methods without
> return values.
> setTeamsHelper(teams);
> }
>
> /**
> * @dao.call name="setTeams"
> * @param teams
> * TODO: Check if there is a bug in xDoclet.
> */
> protected abstract Collection setTeamsHelper(Collection teams);
>
>
>
> Regards,
>
> Andreas Werner
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user