[teiid-commits] teiid SVN: r2146 - trunk/engine/src/main/java/org/teiid/query/processor/program.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed May 19 21:13:36 EDT 2010


Author: shawkins
Date: 2010-05-19 21:13:35 -0400 (Wed, 19 May 2010)
New Revision: 2146

Modified:
   trunk/engine/src/main/java/org/teiid/query/processor/program/Program.java
Log:
fix for refactoring error in the tostring method

Modified: trunk/engine/src/main/java/org/teiid/query/processor/program/Program.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/program/Program.java	2010-05-19 23:20:03 UTC (rev 2145)
+++ trunk/engine/src/main/java/org/teiid/query/processor/program/Program.java	2010-05-20 01:13:35 UTC (rev 2146)
@@ -182,29 +182,24 @@
      * The sub program(s) from those kinds of instructions are passed, recursively, into this
      * method.
      */
-    private final int programToString(StringBuilder str) {
+    private final void programToString(StringBuilder str) {
 
         int instructionIndex = 0;
         ProgramInstruction inst = getInstructionAt(instructionIndex);
     
         while(inst != null) {
             
-            printLine(counter++, inst.toString(), str);
+            printLine(instructionIndex++, inst.toString(), str);
 
-			if(counter > 1000) { 
-			    printLine(counter, "[OUTPUT TRUNCATED...]", str); //$NON-NLS-1$
+			if(instructionIndex > 1000) { 
+			    printLine(instructionIndex, "[OUTPUT TRUNCATED...]", str); //$NON-NLS-1$
 			    break;
 			}
 
-            instructionIndex++;
             inst = getInstructionAt(instructionIndex);
-        
         }
-
-        return counter;
     }
 
-
     private static final void printLine(int counter, String line, StringBuilder buffer) {
         // Pad counter with spaces
         String counterStr = "" + counter + ": "; //$NON-NLS-1$ //$NON-NLS-2$



More information about the teiid-commits mailing list