CassandraExceptionTranslator wrong order fix

This commit is contained in:
Alex Shvid
2013-11-25 18:12:26 -08:00
parent e8cc60a59d
commit 97ea65bdcf

View File

@@ -70,14 +70,14 @@ public class CassandraExceptionTranslator implements PersistenceExceptionTransla
*/
public DataAccessException translateExceptionIfPossible(RuntimeException x) {
if (!(x instanceof DriverException)) {
return null;
}
if (x instanceof DataAccessException) {
return (DataAccessException) x;
}
if (!(x instanceof DriverException)) {
return null;
}
// Remember: subclasses must come before superclasses, otherwise the
// superclass would match before the subclass!