diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-07-15 21:24:53 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-07-15 21:24:53 +0000 |
commit | 186ad50d1816fc05b9a06b204e421fe5598fa331 (patch) | |
tree | daf2b5560cf26f3f30562a366d18c1e9b12ccc14 /poi-scratchpad | |
parent | 30b20e3967a52a9b9aece72caabdb0e6251919d9 (diff) | |
download | poi-186ad50d1816fc05b9a06b204e421fe5598fa331.tar.gz poi-186ad50d1816fc05b9a06b204e421fe5598fa331.zip |
[github-351] make test loop more efficient
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902752 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad')
-rw-r--r-- | poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java b/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java index f4e9efe3c7..f826392d7a 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hdgf/streams/TestStreamComplex.java @@ -254,8 +254,8 @@ public final class TestStreamComplex extends StreamTest { // 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; } } |