[github-351] make test loop more efficient

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-07-15 21:24:53 +00:00
parent 30b20e3967
commit 186ad50d18
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}