com.google.common.base.Objects



API Populatity

71 Client projects

Project: com.google

Project MovingBlocks/Terasology in file ...ava.org.terasology.network.internal.NetClient.java (2013-06-08)
@@ -16,6 +16,7 @@
 
 package org.terasology.network.internal;
 
+import com.google.common.base.Objects;
 import com.google.common.collect.LinkedHashMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -473,7 +474,7 @@ private void processEvents(NetData.NetMessage message) {
                 target = networkSystem.getEntity(eventMessage.getTargetId());
             }
             if (target.exists()) {
-                if (networkSystem.getOwner(target).equals(this)) {
+                if (Objects.equal(networkSystem.getOwner(target), this)) {
                     target.send(event);
                 } else {
                     logger.warn("Received event {} for non-owned entity {} from {}", event, target, this);
Project Netflix/servo in file ...main.java.com.netflix.servo.tag.SortedTagList.java (2014-10-15)
@@ -16,7 +16,6 @@
 package com.netflix.servo.tag;
 
 import com.google.common.base.Joiner;
-import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableSortedMap;
 import com.google.common.collect.Maps;
 
@@ -164,7 +163,7 @@ public final class SortedTagList implements TagList {
     /** {@inheritDoc} */
     @Override
     public int hashCode() {
-        return Objects.hashCode(tagSortedMap);
+        return tagSortedMap.hashCode();
     }
 
     /** {@inheritDoc} */
Project SonarSource/sonarqube in file ...rc.main.java.org.sonar.api.security.GroupRole.java (2012-06-14)
@@ -19,7 +19,6 @@
  */
 package org.sonar.api.security;
 
-import com.google.common.base.Objects;
 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.sonar.api.database.BaseIdentifiable;
@@ -82,7 +81,7 @@ public class GroupRole extends BaseIdentifiable {
   }
 
   public boolean isAnyone() {
-    return Objects.equal(groupId, ANYONE_GROUP_ID);
+    return groupId == ANYONE_GROUP_ID;
   }
 
   @Override