mirror of https://github.com/apache/lucene.git
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:
parent
bd8bdb08b3
commit
eae8e8159d
|
@ -606,14 +606,13 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
|
||||||
StringBuilder descr = new StringBuilder();
|
StringBuilder descr = new StringBuilder();
|
||||||
int numFilters = random.nextInt(3);
|
int numFilters = random.nextInt(3);
|
||||||
for (int i = 0; i < numFilters; i++) {
|
for (int i = 0; i < numFilters; i++) {
|
||||||
boolean success = false;
|
while (true) {
|
||||||
while (!success) {
|
|
||||||
final Constructor<? extends CharStream> ctor = charfilters.get(random.nextInt(charfilters.size()));
|
final Constructor<? extends CharStream> ctor = charfilters.get(random.nextInt(charfilters.size()));
|
||||||
final Object args[] = newCharFilterArgs(random, spec.reader, ctor.getParameterTypes());
|
final Object args[] = newCharFilterArgs(random, spec.reader, ctor.getParameterTypes());
|
||||||
reader = createComponent(ctor, args, descr);
|
reader = createComponent(ctor, args, descr);
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
success = true;
|
|
||||||
spec.reader = reader;
|
spec.reader = reader;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -627,14 +626,13 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
|
||||||
StringBuilder descr = new StringBuilder();
|
StringBuilder descr = new StringBuilder();
|
||||||
int numFilters = random.nextInt(5);
|
int numFilters = random.nextInt(5);
|
||||||
for (int i = 0; i < numFilters; i++) {
|
for (int i = 0; i < numFilters; i++) {
|
||||||
boolean success = false;
|
while (true) {
|
||||||
while (!success) {
|
|
||||||
final Constructor<? extends TokenFilter> ctor = tokenfilters.get(random.nextInt(tokenfilters.size()));
|
final Constructor<? extends TokenFilter> ctor = tokenfilters.get(random.nextInt(tokenfilters.size()));
|
||||||
final Object args[] = newFilterArgs(random, spec.stream, ctor.getParameterTypes());
|
final Object args[] = newFilterArgs(random, spec.stream, ctor.getParameterTypes());
|
||||||
final TokenFilter flt = createComponent(ctor, args, descr);
|
final TokenFilter flt = createComponent(ctor, args, descr);
|
||||||
if (flt != null) {
|
if (flt != null) {
|
||||||
success = true;
|
|
||||||
spec.stream = flt;
|
spec.stream = flt;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue