Use the NOOP class to implement the NOOP constant.
Really, they should both be deprecated. Log your exceptions. If there's a special place where you have to hack it to not log an exception, that special place can damn well create its own no-op listener. Or be fixed! Having an abstract class that only implements a blank requestCompleted() would make sense, as would a sharable singleton instance that does nothing on success and always logs on failure. Hmm.
This commit is contained in:
@@ -61,10 +61,5 @@ public interface ResultListener<T>
|
||||
|
||||
/** @deprecated This cannot be type safe so don't use it. */
|
||||
@Deprecated
|
||||
public ResultListener<Object> NOOP = new ResultListener<Object>() {
|
||||
public void requestCompleted (Object result) {
|
||||
}
|
||||
public void requestFailed (Exception cause) {
|
||||
}
|
||||
};
|
||||
public ResultListener<Object> NOOP = new NOOP<Object>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user