mirror of
https://github.com/corda/corda.git
synced 2025-06-22 17:09:00 +00:00
various bugfixes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package java.lang;
|
||||
|
||||
public class Object {
|
||||
protected native Object clone();
|
||||
protected native Object clone() throws CloneNotSupportedException;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
return this == o;
|
||||
|
@ -38,7 +38,10 @@ public class Constructor<T> extends AccessibleObject implements Member {
|
||||
|
||||
private static native <T> T make(Class<T> c);
|
||||
|
||||
public T newInstance(Object ... arguments) {
|
||||
public T newInstance(Object ... arguments)
|
||||
throws InvocationTargetException, InstantiationException,
|
||||
IllegalAccessException
|
||||
{
|
||||
T v = make(method.getDeclaringClass());
|
||||
method.invoke(v, arguments);
|
||||
return v;
|
||||
|
@ -35,7 +35,8 @@ public class Field<T> extends AccessibleObject {
|
||||
return Class.forCanonicalName(getName());
|
||||
}
|
||||
|
||||
public native Object get(Object instance);
|
||||
public native Object get(Object instance) throws IllegalAccessException;
|
||||
|
||||
public native void set(Object instance, Object value);
|
||||
public native void set(Object instance, Object value)
|
||||
throws IllegalAccessException;
|
||||
}
|
||||
|
@ -87,5 +87,6 @@ public class Method<T> extends AccessibleObject implements Member {
|
||||
return types;
|
||||
}
|
||||
|
||||
public native Object invoke(Object instance, Object ... arguments);
|
||||
public native Object invoke(Object instance, Object ... arguments)
|
||||
throws InvocationTargetException, IllegalAccessException;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class HashMap<K, V> implements Map<K, V> {
|
||||
Cell<K, V> next;
|
||||
for (Cell<K, V> c = array[i]; c != null; c = next) {
|
||||
next = c.next();
|
||||
int index = c.getKey().hashCode() & (capacity - 1);
|
||||
int index = c.hashCode() & (capacity - 1);
|
||||
c.setNext(array[index]);
|
||||
array[index] = c;
|
||||
}
|
||||
|
Reference in New Issue
Block a user