Class 'instanceof' fails for org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6 in EAP 6
Issue
- A result set retrieved from a query execution cannot be accessed as a
WrappedResultSetJDK6
- The class name is reported correctly, but
instanceof
fails to match the class
java.sql.ResultSet results = statement.executeQuery();
System.out.println(results.getClass().getName()); // displays org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6
if (results instanceof org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6) {
... // execution never enters this code block
}
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.