[xwiki-devs] [xwiki-notifications] r36061 - platform/core/branches/xwiki-core-3.0/xwiki-core/src/main/java/com/xpn/xwiki/api

Sergiu Dumitriu sergiu at xwiki.com
Mon Mar 28 15:39:40 UTC 2011


On 03/28/2011 12:17 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2011-03-28 12:17:12 +0200 (Mon, 28 Mar 2011)
> New Revision: 36061
>
> Modified:
>     platform/core/branches/xwiki-core-3.0/xwiki-core/src/main/java/com/xpn/xwiki/api/Document.java
> Log:
> XWIKI-6191: String based user related API on Document can return null
>
> Modified: platform/core/branches/xwiki-core-3.0/xwiki-core/src/main/java/com/xpn/xwiki/api/Document.java
> ===================================================================
> --- platform/core/branches/xwiki-core-3.0/xwiki-core/src/main/java/com/xpn/xwiki/api/Document.java	2011-03-28 10:16:18 UTC (rev 36060)
> +++ platform/core/branches/xwiki-core-3.0/xwiki-core/src/main/java/com/xpn/xwiki/api/Document.java	2011-03-28 10:17:12 UTC (rev 36061)
> @@ -357,7 +357,7 @@
>        */
>       public String getAuthor()
>       {

To avoid calling a deprecated method, why don't you use

return StringUtils.defaultString(this.compactWiki....)

> -        return this.compactWikiEntityReferenceSerializer.serialize(this.doc.getAuthorReference());
> +        return this.doc.getAuthor();
>       }
>
>       /**
> @@ -368,7 +368,7 @@
>        */
>       public String getContentAuthor()
>       {
> -        return this.compactWikiEntityReferenceSerializer.serialize(this.doc.getContentAuthorReference());
> +        return this.doc.getContentAuthor();
>       }
>
>       /**
> @@ -417,7 +417,7 @@
>        */
>       public String getCreator()
>       {
> -        return this.compactWikiEntityReferenceSerializer.serialize(this.doc.getCreatorReference());
> +        return this.doc.getCreator();
>       }



-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/



More information about the devs mailing list