On May 30, 2008, at 8:36 AM, Vincent Massol wrote: > > On May 29, 2008, at 11:41 PM, sdumitriu (SVN) wrote: > >> Author: sdumitriu >> Date: 2008-05-29 23:41:59 +0200 (Thu, 29 May 2008) >> New Revision: 9982 >> >> Modified: >> xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/ >> XWiki.java >> Log: >> XWIKI-2415: Sending notifications fails when restoring documents >> from the recycle bin >> Fixed. >> >> >> Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/ >> xpn/xwiki/XWiki.java >> =================================================================== >> --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/ >> xwiki/XWiki.java 2008-05-29 21:10:01 UTC (rev 9981) >> +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/ >> xwiki/XWiki.java 2008-05-29 21:41:59 UTC (rev 9982) >> @@ -1113,6 +1113,12 @@ >> // We need to save the original document since >> saveXWikiDoc() will reset it and we >> // need that original document for the notification below. >> XWikiDocument originalDocument = >> doc.getOriginalDocument(); >> + // Always use an originalDocument, to provide a >> consistent behavior. The cases where >> + // originalDocument is null are rare (specifically >> when the XWikiDocument object is >> + // manually constructed, and not obtained using the >> API). >> + if (originalDocument == null) { >> + originalDocument = new >> XWikiDocument(doc.getSpace(), doc.getName()); >> + } >> >> // Notify listeners about the document change >> if (originalDocument == null || >> originalDocument.isNew()) { > > hmmm... this doesn't look correct. You're forcing the > originalDocument to be not null but then next says: if > originalDocument is null...
Seen your following email that fixed it... Dunno why but my emails are arriving by batch this morning, like one to 5 each time I do a pop. Probably a gmail new "feature"... Thanks -Vincent _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs