mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
bugfixes
This commit is contained in:
@ -204,7 +204,11 @@ public class ObjectInputStream extends InputStream {
|
||||
for (Field f: c.getFields()) {
|
||||
int modifiers = f.getModifiers();
|
||||
if ((modifiers & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) {
|
||||
f.set(o, deserialize(map));
|
||||
try {
|
||||
f.set(o, deserialize(map));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,14 @@ public class ObjectOutputStream extends OutputStream {
|
||||
int modifiers = f.getModifiers();
|
||||
if ((modifiers & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) {
|
||||
out.print(" ");
|
||||
Object v = f.get(o);
|
||||
Object v;
|
||||
|
||||
try {
|
||||
v = f.get(o);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Class t = f.getType();
|
||||
if (t.equals(boolean.class)) {
|
||||
writeBoolean((Boolean) v);
|
||||
|
@ -53,8 +53,8 @@ public class HashMap<K, V> implements Map<K, V> {
|
||||
for (Cell<K, V> c = array[i]; c != null; c = next) {
|
||||
next = c.next();
|
||||
int index = c.hashCode() & (capacity - 1);
|
||||
c.setNext(array[index]);
|
||||
array[index] = c;
|
||||
c.setNext(newArray[index]);
|
||||
newArray[index] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,8 +127,7 @@ public class LinkedList<T> implements List<T> {
|
||||
public T removeFirst() {
|
||||
if (front != null) {
|
||||
T v = front.value;
|
||||
front = front.next;
|
||||
if (front != null) front.prev = null;
|
||||
remove(front);
|
||||
return v;
|
||||
} else {
|
||||
throw new NoSuchElementException();
|
||||
@ -138,8 +137,7 @@ public class LinkedList<T> implements List<T> {
|
||||
public T removeLast() {
|
||||
if (rear != null) {
|
||||
T v = rear.value;
|
||||
rear = rear.prev;
|
||||
if (rear != null) rear.next = null;
|
||||
remove(rear);
|
||||
return v;
|
||||
} else {
|
||||
throw new NoSuchElementException();
|
||||
|
Reference in New Issue
Block a user