db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: odd o.a.d.i.j.TransactionResourceImpl.isLoginException code
Date Tue, 03 Sep 2013 14:22:18 GMT
Dave Brosius <dbrosius@mebigfatguy.com> writes:

> It appears that
> org.apache.derby.impl.jdbc.TransactionResourceImpl.isLoginException is
> perhaps missing an if
>
> should
>
> private boolean isLoginException(Throwable thrownException) {
> if (thrownException instanceof StandardException) {
> ((StandardException) thrownException).getSQLState().equals
> (SQLState.LOGIN_FAILED);
> return true;
> }
> return false;
> }
>
> be
>
> private boolean isLoginException(Throwable thrownException) {
> if (thrownException instanceof StandardException) {
> if ((StandardException) thrownException).getSQLState().equals
> (SQLState.LOGIN_FAILED)
> return true;
> }
> return false;
> }
>
> ?

Good catch! It does indeed look like it was meant to be the latter. Will
you file a JIRA issue for it?

Thanks,


-- 
Knut Anders

Mime
View raw message