Hi Sergiu,

On Oct 11, 2008, at 3:15 AM, sdumitriu (SVN) wrote:

> Author: sdumitriu
> Date: 2008-10-11 03:15:50 +0200 (Sat, 11 Oct 2008)
> New Revision: 13504
>
> Modified:
>  platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/ 
> XWikiDocument.java
> Log:
> XWIKI-2587: Saving a blank wiki page throws exception in Oracle
> Fixed.
>
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/ 
> doc/XWikiDocument.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/ 
> XWikiDocument.java    2008-10-10 23:36:43 UTC (rev 13503)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/ 
> XWikiDocument.java    2008-10-11 01:15:50 UTC (rev 13504)
> @@ -420,6 +420,9 @@
>
>    public void setContent(String content)
>    {
> +        if (content == null) {
> +            content = "";
> +        }

I think this requires some comment explanations (explaining that with  
an Oracel DB the content can be null whereas in other DBs it's never  
null) since normally content cannot be null (we don't check for null  
as a general practice).

Thanks
-Vincent

>
>        if (!content.equals(this.content)) {
>            setContentDirty(true);
>            setWikiNode(null);
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to