Apply suggestions by @kske
Additionally fixed three bugs/ inconsistencies: - status changing keyboard shortcuts are present again - deleted cells no longer show a hand cursor - any event method in LocalDB needing higher priority now has priority 500
This commit is contained in:
@ -105,7 +105,7 @@ public final class SerializationUtils {
|
||||
file.createNewFile();
|
||||
}
|
||||
try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file))) {
|
||||
for (final var obj : objs)
|
||||
for (var obj : objs)
|
||||
out.writeObject(obj);
|
||||
}
|
||||
}
|
||||
@ -119,7 +119,7 @@ public final class SerializationUtils {
|
||||
* @since Envoy Common v0.2-alpha
|
||||
*/
|
||||
public static byte[] writeToByteArray(Object obj) throws IOException {
|
||||
final var baos = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
try (ObjectOutputStream oout = new ObjectOutputStream(baos)) {
|
||||
oout.writeObject(obj);
|
||||
}
|
||||
@ -137,10 +137,10 @@ public final class SerializationUtils {
|
||||
*/
|
||||
public static void writeBytesWithLength(Object obj, OutputStream out) throws IOException {
|
||||
// Serialize object to byte array
|
||||
final var objBytes = writeToByteArray(obj);
|
||||
byte[] objBytes = writeToByteArray(obj);
|
||||
|
||||
// Get length of byte array in bytes
|
||||
final var objLen = intToBytes(objBytes.length);
|
||||
byte[] objLen = intToBytes(objBytes.length);
|
||||
|
||||
// Write length and byte array
|
||||
out.write(objLen);
|
||||
|
Reference in New Issue
Block a user