Index: core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java
===================================================================
--- core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java (revision 2520)
+++ core/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java (working copy)
@@ -174,11 +174,11 @@
}
public String getComment() {
- return comment;
+ return comment != null ? comment : "";
}
public void setComment(String comment) {
- if (!comment.equals(this.comment)) {
+ if (!getComment().equals(comment)) {
setMetaDataDirty(true);
}
this.comment = comment;
Index: core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
===================================================================
--- core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (revision 2520)
+++ core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (working copy)
@@ -321,12 +321,12 @@
public String getParent()
{
- return parent.trim();
+ return parent != null ? parent : "";
}
public void setParent(String parent)
{
- if (!parent.equals(this.parent)) {
+ if (parent != null && !parent.equals(this.parent)) {
setMetaDataDirty(true);
}
this.parent = parent;
@@ -397,11 +397,7 @@
public String getTitle()
{
- if (title == null) {
- return "";
- } else {
- return title;
- }
+ return title != null ? title : "";
}
/**
@@ -472,10 +468,7 @@
public void setTitle(String title)
{
- if (title == null) {
- title = "";
- }
- if (!title.equals(this.title)) {
+ if (title != null && !title.equals(this.title)) {
setContentDirty(true);
}
this.title = title;
@@ -483,11 +476,7 @@
public String getFormat()
{
- if (format == null) {
- return "";
- } else {
- return format;
- }
+ return format != null ? format : "";
}
public void setFormat(String format)
@@ -500,25 +489,17 @@
public String getAuthor()
{
- if (author == null) {
- return "";
- } else {
- return author.trim();
- }
+ return author != null ? author.trim() : "";
}
public String getContentAuthor()
{
- if (contentAuthor == null) {
- return "";
- } else {
- return contentAuthor.trim();
- }
+ return contentAuthor != null ? contentAuthor.trim() : "";
}
public void setAuthor(String author)
{
- if (!getAuthor().equals(this.author)) {
+ if (!getAuthor().equals(author)) {
setMetaDataDirty(true);
}
this.author = author;
@@ -526,7 +507,7 @@
public void setContentAuthor(String contentAuthor)
{
- if (!getContentAuthor().equals(this.contentAuthor)) {
+ if (!getContentAuthor().equals(contentAuthor)) {
setMetaDataDirty(true);
}
this.contentAuthor = contentAuthor;
@@ -534,16 +515,12 @@
public String getCreator()
{
- if (creator == null) {
- return "";
- } else {
- return creator.trim();
- }
+ return creator != null ? creator.trim() : "";
}
public void setCreator(String creator)
{
- if (!getCreator().equals(this.creator)) {
+ if (!getCreator().equals(creator)) {
setMetaDataDirty(true);
}
this.creator = creator;
@@ -581,7 +558,7 @@
public void setCreationDate(Date date)
{
- if ((date != null) && (!creationDate.equals(this.creationDate))) {
+ if ((date != null) && (!date.equals(creationDate))) {
setMetaDataDirty(true);
}
Index: core/src/main/resources/xwiki.hbm.xml
===================================================================
--- core/src/main/resources/xwiki.hbm.xml (revision 2520)
+++ core/src/main/resources/xwiki.hbm.xml (working copy)
@@ -7,7 +7,7 @@
-
+
@@ -15,11 +15,11 @@
-
+
-
+
@@ -43,26 +43,26 @@
-
+
-
+
-
+
-
+
-
+
@@ -71,16 +71,16 @@
-
+
-
+
-
-
+
+
@@ -88,28 +88,28 @@
-
+
-
+
-
+
-
+
-
+
@@ -132,12 +132,12 @@
-
+
-
+
@@ -167,7 +167,7 @@
-
+
@@ -178,11 +178,11 @@
-
+
-
+
@@ -203,7 +203,7 @@
-
+
@@ -351,7 +351,7 @@
-
+
@@ -388,7 +388,7 @@
-
+
@@ -437,7 +437,7 @@
-
+
@@ -447,7 +447,7 @@
-
+
@@ -490,10 +490,10 @@
-
+
-
+
@@ -657,10 +657,10 @@
-
+
-
+
@@ -672,13 +672,13 @@
-
+
-
+
-
+
@@ -693,7 +693,7 @@
-
+
@@ -750,10 +750,10 @@
-
+
-
+
Index: web/standard/src/main/webapp/WEB-INF/hibernate.cfg.xml
===================================================================
--- web/standard/src/main/webapp/WEB-INF/hibernate.cfg.xml (revision 2520)
+++ web/standard/src/main/webapp/WEB-INF/hibernate.cfg.xml (working copy)
@@ -33,14 +33,31 @@
com.mysql.jdbc.Driver
org.hibernate.dialect.MySQLDialect
+
+
+
+
+
+
com.xpn.xwiki.store.DBCPConnectionProvider
2
2
+
+
-
-