You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/03/11 00:25:45 UTC

svn commit: r157012 - lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java

Author: michi
Date: Thu Mar 10 15:25:43 2005
New Revision: 157012

URL: http://svn.apache.org/viewcvs?view=rev&rev=157012
Log:
all methods synchronized

Modified:
    lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java?view=diff&r1=157011&r2=157012
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java Thu Mar 10 15:25:43 2005
@@ -123,7 +123,7 @@
      * Checks if the tree file has been modified externally and reloads the site tree.
      * @throws SiteTreeException when something went wrong.
      */
-    protected void checkModified() {
+    protected synchronized void checkModified() {
         if (area.equals(Publication.LIVE_AREA)
             && treefile.isFile()
             && treefile.lastModified() > lastModified) {
@@ -148,7 +148,7 @@
      * 
      * @throws ParserConfigurationException if an error occurs
      */
-    public Document createDocument() throws ParserConfigurationException {
+    public synchronized Document createDocument() throws ParserConfigurationException {
         document = DocumentHelper.createDocument(NAMESPACE_URI, "site", null);
 
         Element root = document.getDocumentElement();
@@ -170,7 +170,7 @@
      * 
      * @return the node that matches the path given in the list of ids
      */
-    protected Node findNode(Node node, List ids) {
+    protected synchronized Node findNode(Node node, List ids) {
 
         checkModified();
 
@@ -427,7 +427,7 @@
      * 
      * @return the Node if there is a Node for the given document-id, null otherwise
      */
-    private Node getNodeInternal(String documentId) {
+    private synchronized Node getNodeInternal(String documentId) {
         StringTokenizer st = new StringTokenizer(documentId, "/");
         ArrayList ids = new ArrayList();
 
@@ -442,7 +442,7 @@
     /**
      * @see org.apache.lenya.cms.publication.SiteTree#getNode(java.lang.String)
      */
-    public SiteTreeNode getNode(String documentId) {
+    public synchronized SiteTreeNode getNode(String documentId) {
         assert documentId != null;
 
         SiteTreeNode treeNode = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org