Archiviert
13
0

Fixed a couple of minor bugs.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-09-29 22:25:09 +02:00
Ursprung 721d92bd4f
Commit 15b33925c0
3 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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.

Datei anzeigen

@ -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")

Datei anzeigen

@ -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();