Bad exception handling in OracleDatabase.setConnection

Description

We get this message using Oracle:

"Could not set remarks reporting on OracleDatabase: <exception message>"

I was digging around trying to determine why that happens. Apparently this occurs in OracleDatabase.setConnection. That method attempts to use reflection to find the method "getRemarksReporting" on the connection. However, our Connection does not have that method.

The comment in the catch indicates "that is OK". However, if that happens, then there are two lines of code that are skipped, and I assume those two lines are important.

This is what that method currently looks like:

I believe this would be a better implementation:

Environment

Linux, Oracle

Reporter

Robert Huffman

Components

Fix versions

Affects versions

Priority

Major
Configure