| name | frl-coding-standard |
| description | Coding standards for all Java code in fdb-record-layer. Apply when writing or reviewing any Java code. |
All Java, Gradle, and property files MUST end with a newline character.
Target Java 17 language level, compiled with JDK 21.
Exceptions
The two layers use different exception systems. Know which layer you are in.
fdb-record-layer-* (record layer)
Exceptions extend RecordCoreException, which extends LoggableException (unchecked).
- The exception message MUST be a static string — no string interpolation or variables.
- Use
.addLogInfo(LogMessageKeys.KEY, value) to attach context. Include as much as needed
to diagnose the error: subspace, primary key, record type, index name, etc.
throw new RecordCoreException("Found corrupt record: " + record.getPrimaryKey());
throw new RecordCoreException("Found corrupt record")
.addLogInfo(LogMessageKeys.PRIMARY_KEY, record.getPrimaryKey())
.addLogInfo(LogMessageKeys.RECORD_TYPE, record.getRecordType());
fdb-relational-* (relational / SQL layer)
Exceptions are RelationalException (checked, extends Exception). Always pair with an
ErrorCode, which maps to a SQLSTATE-standard 5-digit code.
- Message must still be a static string.