Author: fanningpj
Date: Fri Jul 15 21:24:53 2022
New Revision: 1902752

URL: http://svn.apache.org/viewvc?rev=1902752&view=rev
Log:
[github-351] make test loop more efficient

Modified:
    
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java

Modified: 
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java?rev=1902752&r1=1902751&r2=1902752&view=diff
==============================================================================
--- 
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java
 (original)
+++ 
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java
 Fri Jul 15 21:24:53 2022
@@ -254,8 +254,8 @@ public final class TestStreamComplex ext
 
         // One of which is Text
         boolean hasText = false;
-        for(int i=0; i<cs.getChunks().length; i++) {
-            if(cs.getChunks()[i].getName().equals("Text")) {
+        for(int i = 0; !hasText && i < cs.getChunks().length; i++) {
+            if (cs.getChunks()[i].getName().equals("Text")) {
                 hasText = true;
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to