db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1359098 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
Date Mon, 09 Jul 2012 12:13:49 GMT
Author: kahatlen
Date: Mon Jul  9 12:13:49 2012
New Revision: 1359098

URL: http://svn.apache.org/viewvc?rev=1359098&view=rev
Log:
DERBY-5847: Clean up IDE warnings in DRDAConnThread

- Compare SQL states with String.equals() instead of !=

- Remove unused variable

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=1359098&r1=1359097&r2=1359098&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Mon Jul 
9 12:13:49 2012
@@ -1472,8 +1472,6 @@ class DRDAConnThread extends Thread {
 	 	try {
 			database.makeConnection(p);
 	  	} catch (SQLException se) {
-			String sqlState = se.getSQLState();
-
 			databaseAccessException = se;
 			for (; se != null; se = se.getNextException())
 			{
@@ -6444,10 +6442,9 @@ class DRDAConnThread extends Thread {
 		// as extended diagnostics
 		// move to first ROW_DELETED or ROW_UPDATED exception. These have been
 		// added to the end of the warning chain.
-		while (
-				nextException != null && 
-				nextException.getSQLState() != SQLState.ROW_UPDATED &&
-				nextException.getSQLState() != SQLState.ROW_DELETED) {
+        while (!(nextException == null ||
+                 SQLState.ROW_UPDATED.equals(nextException.getSQLState()) ||
+                 SQLState.ROW_DELETED.equals(nextException.getSQLState()))) {
 			nextException = nextException.getNextException();
 		}
 



Mime
View raw message