List Info

Thread: Re: wrong comment and dead code in DocumentUsecase




Re: wrong comment and dead code in DocumentUsecase
user name
2007-01-30 10:45:54
Joern Nettingsmeier schrieb:
> 
> 
> Andreas Hartmann wrote:
>> Jörn Nettingsmeier schrieb:
>>> hi *!
>>>
>>> obviously, the following code from
>>>
/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/
DocumentUsecase.java
>>>
>>> does not do what the comment claims it does:

[...]

> ok, but then let's either fix the comment, or change
the implementation to
>  protected Document getTargetDocument(boolean success)
{
>      if (!success) return getSourceDocument();
>      Document document = (Document)
getParameter(TARGET_DOCUMENT);
>      if (document == null) {
>          document = getSourceDocument();
>      }
>      return document;
>  }

I updated the code, thanks for the pointer!
I didn't test it yet, though.

-- Andreas


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )