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.
|
* Retrieve the underlying listener.
|
||||||
* @return Underlying listener.
|
* @return Underlying listener.
|
||||||
|
@ -206,11 +206,12 @@ public final class StructureCompiler {
|
|||||||
// Call the define method
|
// Call the define method
|
||||||
try {
|
try {
|
||||||
if (defineMethod == null) {
|
if (defineMethod == null) {
|
||||||
defineMethod = ClassLoader.class.getDeclaredMethod("defineClass",
|
Method defined = ClassLoader.class.getDeclaredMethod("defineClass",
|
||||||
new Class<?>[] { String.class, byte[].class, int.class, int.class });
|
new Class<?>[] { String.class, byte[].class, int.class, int.class });
|
||||||
|
|
||||||
// Awesome. Now, create and return it.
|
// Awesome. Now, create and return it.
|
||||||
defineMethod.setAccessible(true);
|
defined.setAccessible(true);
|
||||||
|
defineMethod = defined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
@ -172,11 +172,11 @@ public class DefaultInstances {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Constructor<T> minimum = getMinimumConstructor(type);
|
Constructor<T> minimum = getMinimumConstructor(type);
|
||||||
int parameterCount = minimum.getParameterTypes().length;
|
|
||||||
|
|
||||||
// Create the type with this constructor using default values. This might fail, though.
|
// Create the type with this constructor using default values. This might fail, though.
|
||||||
try {
|
try {
|
||||||
if (minimum != null) {
|
if (minimum != null) {
|
||||||
|
int parameterCount = minimum.getParameterTypes().length;
|
||||||
Object[] params = new Object[parameterCount];
|
Object[] params = new Object[parameterCount];
|
||||||
Class<?>[] types = minimum.getParameterTypes();
|
Class<?>[] types = minimum.getParameterTypes();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren