Author: vmassol
Date: 2008-01-08 16:21:34 +0100 (Tue, 08 Jan 2008)
New Revision: 6673
Modified:
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/doc/rcs/XWikiRCSNodeInfo.java
Log:
XWIKI-1995: Error inserting NULL values in NOT-NULL fields under Oracle for
Version Comments/Authors
Merged from trunk (rev 6669)
Modified:
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/doc/rcs/XWikiRCSNodeInfo.java
===================================================================
---
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/doc/rcs/XWikiRCSNodeInfo.java
2008-01-08 15:20:54 UTC (rev 6672)
+++
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/main/java/com/xpn/xwiki/doc/rcs/XWikiRCSNodeInfo.java
2008-01-08 15:21:34 UTC (rev 6673)
@@ -39,7 +39,7 @@
public class XWikiRCSNodeInfo implements Comparable
{
/**
- * composite primary id of class.
+ * composite primary id of class.
*/
private XWikiRCSNodeId id;
/**
@@ -106,7 +106,10 @@
*/
public String getAuthor()
{
- return author;
+ // For Oracle and other databases, an empty string is equivalent to a
NULL and thus
+ // we had to remove the NOT-NULL condition on this field. Hence we
need to test if it's
+ // null here and return an empty string so that all code calling this
will not be impacted.
+ return author != null ? author : "";
}
/**
* @param updateAuthor - author of modification.
@@ -120,7 +123,10 @@
*/
public String getComment()
{
- return comment;
+ // For Oracle and other databases, an empty string is equivalent to a
NULL and thus
+ // we had to remove the NOT-NULL condition on this field. Hence we
need to test if it's
+ // null here and return an empty string so that all code calling this
will not be impacted.
+ return comment != null ? comment : "";
}
/**
* @param comment - modification's comment.
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications