mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-21 13:32:44 +08:00
Fix initialization of OBJECT_HASHCODE in PrivatelyQueuedListener
This commit is contained in:
+10
-10
@@ -32,16 +32,16 @@ public class PrivatelyQueuedListener<P> {
|
||||
private ListenerErrorHandler errorHandler =
|
||||
DataStructureErrorHandlerFactory.createListenerErrorHandler();
|
||||
|
||||
protected class ListenerHandler implements InvocationHandler {
|
||||
private static final Method OBJECT_HASHCODE;
|
||||
static {
|
||||
try {
|
||||
OBJECT_HASHCODE = Object.class.getMethod("hashCode");
|
||||
}
|
||||
catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
protected class ListenerHandler implements InvocationHandler {
|
||||
private static final Method OBJECT_HASHCODE = initObjectHashCode();
|
||||
|
||||
private static Method initObjectHashCode() {
|
||||
try {
|
||||
return Object.class.getMethod("hashCode");
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
protected final Class<P> iface;
|
||||
|
||||
public ListenerHandler(Class<P> iface) {
|
||||
|
||||
Reference in New Issue
Block a user