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/e150a37d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e150a37d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e150a37d Branch: refs/heads/sandbox/atmosphere Commit: e150a37db0b15dab659fd6e8d8e43e6b5449e6db Parents: 33b12c0 Author: Emond Papegaaij <[email protected]> Authored: Tue Apr 3 16:17:45 2012 +0200 Committer: Emond Papegaaij <[email protected]> Committed: Thu Apr 19 11:07:55 2012 +0200 ---------------------------------------------------------------------- .../wicket/atmosphere/EventSubscription.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/e150a37d/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; }
