LUCENE-3969: Remove useless success variable

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3969@1311322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-04-09 16:56:35 +00:00
parent bd8bdb08b3
commit eae8e8159d
1 changed files with 4 additions and 6 deletions

View File

@ -606,14 +606,13 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
StringBuilder descr = new StringBuilder();
int numFilters = random.nextInt(3);
for (int i = 0; i < numFilters; i++) {
boolean success = false;
while (!success) {
while (true) {
final Constructor<? extends CharStream> ctor = charfilters.get(random.nextInt(charfilters.size()));
final Object args[] = newCharFilterArgs(random, spec.reader, ctor.getParameterTypes());
reader = createComponent(ctor, args, descr);
if (reader != null) {
success = true;
spec.reader = reader;
break;
}
}
}
@ -627,14 +626,13 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
StringBuilder descr = new StringBuilder();
int numFilters = random.nextInt(5);
for (int i = 0; i < numFilters; i++) {
boolean success = false;
while (!success) {
while (true) {
final Constructor<? extends TokenFilter> ctor = tokenfilters.get(random.nextInt(tokenfilters.size()));
final Object args[] = newFilterArgs(random, spec.stream, ctor.getParameterTypes());
final TokenFilter flt = createComponent(ctor, args, descr);
if (flt != null) {
success = true;
spec.stream = flt;
break;
}
}
}