db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1550287 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java
Date Wed, 11 Dec 2013 22:12:08 GMT
Author: kmarsden
Date: Wed Dec 11 22:12:08 2013
New Revision: 1550287

URL: http://svn.apache.org/r1550287
Log:
DERBY-6426 Fix isLoginException
code treats any StandardException as a login exception due to curious no-op code. Added login
state check to make it work as expected. 

Contributed by Dave Brosius


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java?rev=1550287&r1=1550286&r2=1550287&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TransactionResourceImpl.java
Wed Dec 11 22:12:08 2013
@@ -384,8 +384,8 @@ public final class TransactionResourceIm
      * @return true if this is a login failure exception
      */
     private boolean isLoginException(Throwable thrownException) {
-       if (thrownException instanceof StandardException) {
-           ((StandardException) thrownException).getSQLState().equals(SQLState.LOGIN_FAILED);
+       if ((thrownException instanceof StandardException) &&
+           ((StandardException) thrownException).getSQLState().equals(SQLState.LOGIN_FAILED))
{
            return true;
        }
        return false;



Mime
View raw message