[exo-jcr-commits] exo-jcr SVN: r5629 - in jcr/branches/1.15.x: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Feb 14 05:22:28 EST 2012


Author: andrew.plotnikov
Date: 2012-02-14 05:22:27 -0500 (Tue, 14 Feb 2012)
New Revision: 5629

Modified:
   jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
Log:
EXOJCR-1760: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/TransactionChangesLog.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -161,7 +161,10 @@
          }
          catch (IllegalPathException e)
          {
-
+            if (LOG.isTraceEnabled())
+            {
+               LOG.trace("An exception occurred: " + e.getMessage());
+            }
          }
       }
       return null;

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPath.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -524,33 +524,4 @@
       return path;
    }
 
-   /**
-    * Parse textual path entry.
-    *
-    * @param entry - String text
-    * @return QPathEntry
-    * @throws IllegalPathException if text is not a valid entry
-    */
-   private static QPathEntry parseEntry(final String entry) throws IllegalPathException
-   {
-
-      if (!entry.startsWith("["))
-         throw new IllegalPathException("Invalid QPath Entry '" + entry + "' Should start of '['");
-      final int uriStart = 0;
-      final int uriFinish = entry.indexOf("]", uriStart);
-      if (uriFinish == -1)
-         throw new IllegalPathException("Invalid QPath Entry '" + entry + "' No closed ']'");
-      final String uri = entry.substring(uriStart + 1, uriFinish);
-
-      final String localName = entry.substring(uriFinish + 1, entry.length());
-
-      final int ind = localName.indexOf(PREFIX_DELIMITER);
-      if (ind > 1)
-      {
-         return new QPathEntry(uri, localName.substring(0, ind), Integer.parseInt(localName.substring(ind + 1)));
-      }
-
-      return new QPathEntry(uri, localName, 1);
-   }
-
 }

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -367,19 +367,6 @@
       }
    }
 
-   private void validate() throws RepositoryException
-   {
-      if (dataManager == null)
-      {
-         throw new RepositoryException("Datamanager not initialized");
-      }
-      if (indexSearcherHolder == null)
-      {
-         throw new RepositoryException("RepositoryIndexSearcherHolder not initialized");
-      }
-
-   }
-
    private void addPendingNamespaces()
    {
       for (ComponentPlugin plugin : addNamespacePluginHolder.getAddNamespacesPlugins())

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/CNDNodeTypeDataPersister.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -24,7 +24,6 @@
 import org.exoplatform.services.log.ExoLogger;
 import org.exoplatform.services.log.Log;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.List;
@@ -106,8 +105,6 @@
 
    /**
     * {@inheritDoc}
-    * 
-    * @throws IOException
     */
    public void addNodeTypes(List<NodeTypeData> nodeTypes) throws RepositoryException
    {

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -89,7 +89,6 @@
 
    public static final int PARAM_RSYNC_PORT_DEFAULT = 873;
 
-   // TODO
    public static final String PARAM_RSYNC_USER = "rsync-user";
 
    public static final String PARAM_RSYNC_PASSWORD = "rsync-password";

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -91,10 +91,9 @@
       else
       {
          throw new RepositoryConfigurationException(
-            "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. Current RSync Server Entry Path is : "
-               + absoluteRsyncEntryPath
-               + " but it doesnt hold Index folder, that is : "
-               + this.indexPath
+            "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. "
+               + "Current RSync Server Entry Path is : " + absoluteRsyncEntryPath
+               + " but it doesnt hold Index folder, that is : " + this.indexPath
                + ". Please fix configuration according to JCR Documentation and restart application.");
       }
 

Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/RsyncIndexInfos.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -95,10 +95,9 @@
       else
       {
          throw new RepositoryConfigurationException(
-            "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. Current RSync Server Entry Path is : "
-               + absoluteRsyncEntryPath
-               + " but it doesnt hold Index folder, that is : "
-               + this.indexPath
+            "Invalid RSync configuration. Index must be placed in folder that is a descendant of RSync Server Entry. "
+               + "Current RSync Server Entry Path is : " + absoluteRsyncEntryPath
+               + " but it doesnt hold Index folder, that is : " + this.indexPath
                + ". Please fix configuration according to JCR Documentation and restart application.");
       }
 

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistingRepositorySameConfigRestore.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -237,7 +237,7 @@
             }
             catch (BackupException e)
             {
-               log.error("Can't rollback changes", e);
+               LOG.error("Can't rollback changes", e);
             }
          }
 
@@ -254,7 +254,7 @@
             }
             catch (BackupException e)
             {
-               log.error("Can't close restorer", e);
+               LOG.error("Can't close restorer", e);
             }
          }
 
@@ -267,7 +267,7 @@
          }
          catch (RepositoryException e)
          {
-            log.error("Can't resume repository", e);
+            LOG.error("Can't resume repository", e);
          }
       }
    }

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java	2012-02-14 09:37:23 UTC (rev 5628)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobRepositoryRestore.java	2012-02-14 10:22:27 UTC (rev 5629)
@@ -60,7 +60,7 @@
    /**
     * The apache logger.
     */
-   protected static Log log = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
+   protected static Log LOG = ExoLogger.getLogger("exo.jcr.component.ext.JobRepositoryRestore");
 
    /**
     * REPOSITORY_RESTORE_STARTED. The state of start restore.
@@ -222,7 +222,7 @@
       {
          restored = false;
 
-         log.error(
+         LOG.error(
             "Can not restore workspace \"" + currennWorkspaceName + " in repository \"" + repositoryEntry.getName()
                + "\".", e);
 
@@ -234,7 +234,7 @@
       {
          restored = false;
 
-         log.error(
+         LOG.error(
             "Can not restore workspace \"" + currennWorkspaceName + " in repository \"" + repositoryEntry.getName()
                + "\".", t);
 
@@ -252,7 +252,7 @@
             }
             catch (Throwable thr)
             {
-               log.error("The partly restored repository \"" + repositoryEntry.getName() + "\" can not be removed.",
+               LOG.error("The partly restored repository \"" + repositoryEntry.getName() + "\" can not be removed.",
                   thr);
             }
          }
@@ -283,6 +283,10 @@
       catch (RepositoryException e)
       {
          // The repository not exist.
+         if (LOG.isTraceEnabled())
+         {
+            LOG.trace("An exception occurred: " + e.getMessage());
+         }
       }
 
       if (mr != null)
@@ -382,7 +386,7 @@
       }
       catch (Throwable t)
       {
-         log.error("The restore was fail", t);
+         LOG.error("The restore was fail", t);
       }
    }
 



More information about the exo-jcr-commits mailing list