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:
2020-10-17 16:40:13 +02:00
committed by KSKE Git
parent a0812f193e
commit 77a75fc37c
14 changed files with 193 additions and 167 deletions

View File

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