JDBC 4.5 adds the following methods to Connection:
default String enquoteIdentifier(String identifier, Boolean alwaysQuote) throws SQLException
default String enquoteLiteral(String val) throws SQLException
default String enquoteNCharLiteral(String val) throws SQLException
default boolean isSimpleIdentifier(String identifier) throws SQLException
The default implementation is not sufficient for Firebird (especially dialect 1); move the implementation of the equivalent methods from FBStatement to connection, and make statement call the implementation on FBConnection (NOTE: we may also need to move those overridden methods from FBStatement to AbstractStatement for correctness).