From d1ef556a55d382187ea2356b1ad3f04f15e715c5 Mon Sep 17 00:00:00 2001 From: samskivert Date: Thu, 18 Sep 2008 17:23:56 +0000 Subject: [PATCH] No using raw types. Also no annotating whole methods @SuppressWarnings("unchecked") even if they're simple. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2437 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/Predicate.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/samskivert/util/Predicate.java b/src/java/com/samskivert/util/Predicate.java index a9089ebb..1dc0afc7 100644 --- a/src/java/com/samskivert/util/Predicate.java +++ b/src/java/com/samskivert/util/Predicate.java @@ -144,20 +144,20 @@ public abstract class Predicate * Returns a type-safe reference to the shared instance of a predicate that always returns * true. */ - @SuppressWarnings("unchecked") public static Predicate trueInstance () { - return TRUE_INSTANCE; + @SuppressWarnings("unchecked") Predicate pred = (Predicate)TRUE_INSTANCE; + return pred; } /** * Returns a type-safe reference to the shared instance of a predicate that always returns * false. */ - @SuppressWarnings("unchecked") public static Predicate falseInstance () { - return FALSE_INSTANCE; + @SuppressWarnings("unchecked") Predicate pred = (Predicate)FALSE_INSTANCE; + return pred; } //-------------------------------------------------------------------- @@ -312,14 +312,14 @@ public abstract class Predicate } /** A shared predicate instance that always matches its input. */ - protected static final Predicate TRUE_INSTANCE = new Predicate() { + protected static final Predicate TRUE_INSTANCE = new Predicate() { public boolean isMatch (Object object) { return true; } }; /** A shared predicate instance that never matches its input. */ - protected static final Predicate FALSE_INSTANCE = new Predicate() { + protected static final Predicate FALSE_INSTANCE = new Predicate() { public boolean isMatch (Object object) { return false; }