You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2012/04/03 16:18:10 UTC

git commit: use guava, not java 7 api

Updated Branches:
  refs/heads/sandbox/atmosphere 0d9bf36b7 -> 205efe2b8


use guava, not java 7 api


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/205efe2b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/205efe2b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/205efe2b

Branch: refs/heads/sandbox/atmosphere
Commit: 205efe2b8ddfc40d7b93fd0876c2c36afa721edd
Parents: 0d9bf36
Author: Emond Papegaaij <pa...@apache.org>
Authored: Tue Apr 3 16:17:45 2012 +0200
Committer: Emond Papegaaij <pa...@apache.org>
Committed: Tue Apr 3 16:17:45 2012 +0200

----------------------------------------------------------------------
 .../wicket/atmosphere/EventSubscription.java       |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/205efe2b/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventSubscription.java
----------------------------------------------------------------------
diff --git a/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventSubscription.java b/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventSubscription.java
index 6d4ca32..c31c765 100644
--- a/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventSubscription.java
+++ b/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/EventSubscription.java
@@ -1,11 +1,11 @@
 package org.apache.wicket.atmosphere;
 
 import java.lang.reflect.Method;
-import java.util.Objects;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.WicketRuntimeException;
 
+import com.google.common.base.Objects;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 
@@ -20,7 +20,7 @@ public class EventSubscription
 	public EventSubscription(Component component, Method method)
 	{
 		componentPath = component.getPageRelativePath();
-		Class< ? > eventType = method.getParameterTypes()[1];
+		Class<?> eventType = method.getParameterTypes()[1];
 		filter = Predicates.and(Predicates.instanceOf(eventType), createFilter(method));
 		methodName = method.getName();
 	}
@@ -31,7 +31,7 @@ public class EventSubscription
 		Subscribe subscribe = method.getAnnotation(Subscribe.class);
 		try
 		{
-			return (Predicate<Object>) subscribe.filter().newInstance();
+			return (Predicate<Object>)subscribe.filter().newInstance();
 		}
 		catch (InstantiationException e)
 		{
@@ -61,7 +61,7 @@ public class EventSubscription
 	@Override
 	public int hashCode()
 	{
-		return Objects.hash(componentPath, methodName);
+		return Objects.hashCode(componentPath, methodName);
 	}
 
 	@Override
@@ -69,9 +69,9 @@ public class EventSubscription
 	{
 		if (obj instanceof EventSubscription)
 		{
-			EventSubscription other = (EventSubscription) obj;
-			return Objects.equals(componentPath, other.getComponentPath())
-				&& Objects.equals(methodName, other.getMethodName());
+			EventSubscription other = (EventSubscription)obj;
+			return Objects.equal(componentPath, other.getComponentPath()) &&
+				Objects.equal(methodName, other.getMethodName());
 		}
 		return false;
 	}