jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1708169 - /jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
Date Mon, 12 Oct 2015 17:14:47 GMT
Author: tripod
Date: Mon Oct 12 17:14:47 2015
New Revision: 1708169

URL: http://svn.apache.org/viewvc?rev=1708169&view=rev
Log:
@trivial swap equals for strings

Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java?rev=1708169&r1=1708168&r2=1708169&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageManagerImpl.java
Mon Oct 12 17:14:47 2015
@@ -147,7 +147,7 @@ public class JcrPackageManagerImpl exten
         PackageId bestId = null;
         while (iter.hasNext()) {
             Node child = iter.nextNode();
-            if (child.getName().equals(".snapshot")) {
+            if (".snapshot".equals(child.getName())) {
                 continue;
             }
             JcrPackageImpl pack = new JcrPackageImpl(child);
@@ -364,7 +364,7 @@ public class JcrPackageManagerImpl exten
             throws RepositoryException, IOException {
         // sanitize name
         String ext = Text.getName(name, '.');
-        if (ext.equals("zip") || ext.equals("jar")) {
+        if ("zip".equals(ext) || "jar".equals(ext)) {
             name = name.substring(0, name.length() - 4);
         }
         if (!PackageId.isValid(group, name, version)) {
@@ -581,7 +581,7 @@ public class JcrPackageManagerImpl exten
             return session.getNode(path);
         }
         String parentPath = Text.getRelativeParent(path, 1);
-        if (path == null || (path.equals("/") && parentPath.equals(path))) {
+        if (path == null || ("/".equals(path) && parentPath.equals(path))) {
             throw new RepositoryException("could not crete intermediate nodes");
         }
         Node parent = mkdir(parentPath, autoSave);
@@ -743,7 +743,7 @@ public class JcrPackageManagerImpl exten
         if (root != null) {
             for (NodeIterator iter = root.getNodes(); iter.hasNext();) {
                 Node child = iter.nextNode();
-                if (child.getName().equals(".snapshot")) {
+                if (".snapshot".equals(child.getName())) {
                     continue;
                 }
                 JcrPackageImpl pack = new JcrPackageImpl(child);
@@ -759,7 +759,7 @@ public class JcrPackageManagerImpl exten
                         }
                     }
                 } else if (child.hasNodes() && !shallow){
-                    listPackages(child, packages, filter, built, shallow);
+                    listPackages(child, packages, filter, built, false);
                 }
             }
         }



Mime
View raw message