mirror of
https://github.com/google/nomulus
synced 2026-01-06 21:47:31 +00:00
Remove "@ForOverride" from .toString and .equals
Inheriting classes reimplementing these methods might want to call the super. version of them in some cases (only change the default behavior for some methods). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149772767
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
package google.registry.util;
|
||||
|
||||
import com.google.common.reflect.Reflection;
|
||||
import com.google.errorprone.annotations.ForOverride;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -72,7 +71,6 @@ public abstract class ComparingInvocationHandler<T> implements InvocationHandler
|
||||
* @param method the method where the difference was found
|
||||
* @param message human readable description of the difference found
|
||||
*/
|
||||
@ForOverride
|
||||
protected abstract void log(Method method, String message);
|
||||
|
||||
/**
|
||||
@@ -85,7 +83,6 @@ public abstract class ComparingInvocationHandler<T> implements InvocationHandler
|
||||
* @param method the method whose return value is given
|
||||
* @param object the object returned by a call to method
|
||||
*/
|
||||
@ForOverride
|
||||
protected String toString(
|
||||
@SuppressWarnings("unused") Method method,
|
||||
@Nullable Object object) {
|
||||
@@ -103,7 +100,6 @@ public abstract class ComparingInvocationHandler<T> implements InvocationHandler
|
||||
* @param actual the object returned by a call to method for the "actual" implementation
|
||||
* @param second the object returned by a call to method for the "second" implementation
|
||||
*/
|
||||
@ForOverride
|
||||
protected boolean equals(
|
||||
@SuppressWarnings("unused") Method method,
|
||||
@Nullable Object actual,
|
||||
@@ -121,7 +117,6 @@ public abstract class ComparingInvocationHandler<T> implements InvocationHandler
|
||||
* @param actual the exception thrown by a call to method for the "actual" implementation
|
||||
* @param second the exception thrown by a call to method for the "second" implementation
|
||||
*/
|
||||
@ForOverride
|
||||
protected boolean exceptionEquals(
|
||||
@SuppressWarnings("unused") Method method,
|
||||
Throwable actual,
|
||||
@@ -138,7 +133,6 @@ public abstract class ComparingInvocationHandler<T> implements InvocationHandler
|
||||
* @param method the method whose return value is given
|
||||
* @param exception the exception thrown by a call to method
|
||||
*/
|
||||
@ForOverride
|
||||
protected String exceptionToString(
|
||||
@SuppressWarnings("unused") Method method,
|
||||
Throwable exception) {
|
||||
|
||||
Reference in New Issue
Block a user