You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/06/06 14:20:02 UTC
svn commit: r544822 -
/lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java
Author: andreas
Date: Wed Jun 6 05:20:01 2007
New Revision: 544822
URL: http://svn.apache.org/viewvc?view=rev&rev=544822
Log:
Check for modifications when lazy-loading source node RCML data. This fixes bug 42602.
Modified:
lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java
Modified: lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java?view=diff&rev=544822&r1=544821&r2=544822
==============================================================================
--- lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java (original)
+++ lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeRCML.java Wed Jun 6 05:20:01 2007
@@ -206,23 +206,21 @@
private long lastModified = 0;
protected Document getDocument() throws RevisionControlException {
- if (this.xml == null) {
- try {
- String uri = getRcmlSourceUri();
- if (SourceUtil.exists(uri, this.manager)) {
- long sourceLastModified = SourceUtil.getLastModified(uri, manager);
- if (this.xml == null || sourceLastModified > this.lastModified) {
- this.xml = SourceUtil.readDOM(getRcmlSourceUri(), this.manager);
- this.lastModified = sourceLastModified;
- }
+ try {
+ String uri = getRcmlSourceUri();
+ if (SourceUtil.exists(uri, this.manager)) {
+ long sourceLastModified = SourceUtil.getLastModified(uri, manager);
+ if (this.xml == null || sourceLastModified > this.lastModified) {
+ this.xml = SourceUtil.readDOM(getRcmlSourceUri(), this.manager);
+ this.lastModified = sourceLastModified;
}
- else {
- this.xml = DocumentHelper.createDocument(null, "XPSRevisionControl", null);
- }
- } catch (Exception e) {
- throw new RevisionControlException("Could not read RC file [" + getRcmlSourceUri()
- + "]");
}
+ else {
+ this.xml = DocumentHelper.createDocument(null, "XPSRevisionControl", null);
+ }
+ } catch (Exception e) {
+ throw new RevisionControlException("Could not read RC file [" + getRcmlSourceUri()
+ + "]");
}
return this.xml;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org