Put Java statements on separate lines

This commit is contained in:
admin committed 2026-10-10 08:30:28 +02:00
1 parent 01c82a8223
commit 11bfe71124
15 files changed
+228 -85

No files matched your search

+4 -2
View File
@@ -52,7 +52,8 @@ final class NodeRegistry {
connection.commit();
return new NodeClient.Node(identity.nodeId(), identity.hostId(), url);
} catch (SQLException | IOException error) {
try { connection.rollback(); } catch (SQLException rollback) { error.addSuppressed(rollback); }
try { connection.rollback(); }
catch (SQLException rollback) { error.addSuppressed(rollback); }
if (error instanceof IOException io) throw io;
throw new IOException("Node registration failed", error);
} finally {
@@ -77,7 +78,8 @@ final class NodeRegistry {
connection.commit();
return nodes;
} catch (SQLException | IOException | RuntimeException error) {
try { connection.rollback(); } catch (SQLException rollback) { error.addSuppressed(rollback); }
try { connection.rollback(); }
catch (SQLException rollback) { error.addSuppressed(rollback); }
if (error instanceof IOException io) throw io;
if (error instanceof SQLException sql) throw new IOException("Node registry check failed", sql);
throw (RuntimeException) error;