This implementation is calling "stmt.executeQuery(query);" directly followed by "rs = stmt.getResultSet();". This is effectively retrieving the ResultSet twice. The javase 7 standard notes that "This method should be called only once per result."
The Jaybird JDBC driver strictly adheres to this behavior throwing "org.firebirdsql.jdbc.FBSQLException: Only one resultset at a time/statement" when getResultSet is called more than once (line 893 of jaybird repo).
To add to this, Jaybird calls getResultSet from executeQuery, so the two lines in BaseJdbcMetaDataFactoryImpl cause this issue everytime (though I'm not entirely sure how to reproduce the error outside of our environment). Personally I would call this undefined behavior according to the jdbc standard, but I would agree with jaybirds approach by not allowing several calls to getResultSet based off it's notes.
This is unfortunately causing issues for our client.