db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r598418 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
Date Mon, 26 Nov 2007 20:42:07 GMT
Author: djd
Date: Mon Nov 26 12:42:07 2007
New Revision: 598418

URL: http://svn.apache.org/viewvc?rev=598418&view=rev
Log:
Remove unncessary if statement in RowResultSet.getnextRowCore(). The field currentRow is set
to null on entry to the method so the subsequent check for it being null will always be true.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java?rev=598418&r1=598417&r2=598418&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java Mon
Nov 26 12:42:07 2007
@@ -139,21 +139,18 @@
 			if (!next) 
 			{
 	            next = true;
-				if (currentRow == null)
-				{
-					if (cachedRow != null)
-					{
-						currentRow = cachedRow;
-					}
-					else if (row != null)
-					{
-						currentRow = (ExecRow) row.invoke(activation);
-						if (canCacheRow)
-						{
-							cachedRow = currentRow;
-						}
-					}
-				}
+				if (cachedRow != null)
+                {
+                    currentRow = cachedRow;
+                }
+                else if (row != null)
+                {
+                    currentRow = (ExecRow) row.invoke(activation);
+                    if (canCacheRow)
+                    {
+                        cachedRow = currentRow;
+                    }
+                }
 				rowsReturned++;
 			}
 			setCurrentRow(currentRow);



Mime
View raw message