You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/02/26 20:42:13 UTC

svn commit: r1662546 - /lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java

Author: noble
Date: Thu Feb 26 19:42:13 2015
New Revision: 1662546

URL: http://svn.apache.org/r1662546
Log:
SOLR-7130: formatting mistakes

Modified:
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java?rev=1662546&r1=1662545&r2=1662546&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java Thu Feb 26 19:42:13 2015
@@ -1109,30 +1109,30 @@ public class CloudSolrClient extends Sol
 
 
   protected DocCollection getDocCollection(ClusterState clusterState, String collection, Integer expectedVersion) throws SolrException {
-    if(collection == null) return null;
+    if (collection == null) return null;
     DocCollection col = getFromCache(collection);
-    if(col != null) {
-      if(expectedVersion == null) return col;
-      if(expectedVersion.intValue() == col.getZNodeVersion()) return col;
+    if (col != null) {
+      if (expectedVersion == null) return col;
+      if (expectedVersion.intValue() == col.getZNodeVersion()) return col;
     }
 
     ClusterState.CollectionRef ref = clusterState.getCollectionRef(collection);
-    if(ref == null){
+    if (ref == null) {
       //no such collection exists
       return null;
     }
-    if(!ref.isLazilyLoaded()) {
+    if (!ref.isLazilyLoaded()) {
       //it is readily available just return it
       return ref.get();
     }
     List locks = this.locks;
     final Object lock = locks.get(Math.abs(Hash.murmurhash3_x86_32(collection, 0, collection.length(), 0) % locks.size()));
-    synchronized (lock){
+    synchronized (lock) {
       //we have waited for sometime just check once again
       col = getFromCache(collection);
-      if(col !=null) {
-        if(expectedVersion == null) return col;
-        if(expectedVersion.intValue() == col.getZNodeVersion()) {
+      if (col != null) {
+        if (expectedVersion == null) return col;
+        if (expectedVersion.intValue() == col.getZNodeVersion()) {
           return col;
         } else {
           collectionStateCache.remove(collection);
@@ -1140,8 +1140,8 @@ public class CloudSolrClient extends Sol
       }
       col = ref.get();//this is a call to ZK
     }
-    if(col == null ) return  null;
-    if(col.getStateFormat() >1) collectionStateCache.put(collection, new ExpiringCachedDocCollection(col));
+    if (col == null) return null;
+    if (col.getStateFormat() > 1) collectionStateCache.put(collection, new ExpiringCachedDocCollection(col));
     return col;
   }