You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/01/30 21:21:23 UTC

[2/4] git commit: Added else if instead of separate else block for consistency/efficiency.

Added else if instead of separate else block for consistency/efficiency.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e03500d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e03500d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e03500d2

Branch: refs/heads/master
Commit: e03500d2662f4c8276f8eb85d3a2682bd9e6a197
Parents: 443438f
Author: GERey <gr...@apigee.com>
Authored: Thu Jan 30 09:44:07 2014 -0800
Committer: GERey <gr...@apigee.com>
Committed: Thu Jan 30 09:44:07 2014 -0800

----------------------------------------------------------------------
 .../usergrid/persistence/cassandra/RelationManagerImpl.java | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e03500d2/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
index 3414139..7f69e66 100644
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
+++ b/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
@@ -1098,16 +1098,13 @@ public class RelationManagerImpl implements RelationManager {
             else if ( itrObj instanceof SimpleEntityRef ) {
                 connection = new ConnectionRefImpl( (SimpleEntityRef) itrObj );
             }
-            else {
-                if ( itrObj instanceof EntityRef ) {
+            else if ( itrObj instanceof EntityRef ) {
                     connection = new ConnectionRefImpl( new SimpleEntityRef((EntityRef) itr.next()));
-                }
-                else if ( itrObj instanceof UUID ) {
+            }
+            else if ( itrObj instanceof UUID ) {
                     connection = new ConnectionRefImpl( new SimpleEntityRef((UUID)itr.next()));
-                }
             }
 
-
             batchUpdateEntityConnection( batch, true, connection, timestampUuid );
         }
     }