Fixed a couple of minor bugs.
Dieser Commit ist enthalten in:
Ursprung
721d92bd4f
Commit
15b33925c0
@ -41,6 +41,11 @@ public class PrioritizedListener<TListener> implements Comparable<PrioritizedLis
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the underlying listener.
|
||||
* @return Underlying listener.
|
||||
|
@ -206,11 +206,12 @@ public final class StructureCompiler {
|
||||
// Call the define method
|
||||
try {
|
||||
if (defineMethod == null) {
|
||||
defineMethod = ClassLoader.class.getDeclaredMethod("defineClass",
|
||||
Method defined = ClassLoader.class.getDeclaredMethod("defineClass",
|
||||
new Class<?>[] { String.class, byte[].class, int.class, int.class });
|
||||
|
||||
// Awesome. Now, create and return it.
|
||||
defineMethod.setAccessible(true);
|
||||
defined.setAccessible(true);
|
||||
defineMethod = defined;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
@ -172,11 +172,11 @@ public class DefaultInstances {
|
||||
}
|
||||
|
||||
Constructor<T> minimum = getMinimumConstructor(type);
|
||||
int parameterCount = minimum.getParameterTypes().length;
|
||||
|
||||
// Create the type with this constructor using default values. This might fail, though.
|
||||
try {
|
||||
if (minimum != null) {
|
||||
int parameterCount = minimum.getParameterTypes().length;
|
||||
Object[] params = new Object[parameterCount];
|
||||
Class<?>[] types = minimum.getParameterTypes();
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren