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
________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! 
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to