LUCENE-3969: don't be this evil yet for type char

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3969@1311235 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-04-09 13:44:18 +00:00
parent 6311f71de6
commit f63af6afe5
1 changed files with 8 additions and 1 deletions

View File

@ -188,7 +188,14 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
}); });
put(char.class, new ArgProducer() { put(char.class, new ArgProducer() {
@Override public Object create(Random random) { @Override public Object create(Random random) {
return Character.valueOf((char)random.nextInt(65536)); // nocommit: fix any filters that care to throw IAE instead.
// return Character.valueOf((char)random.nextInt(65536));
while(true) {
char c = (char)random.nextInt(65536);
if (c < '\uD800' || c > '\uDFFF') {
return Character.valueOf(c);
}
}
} }
}); });
put(float.class, new ArgProducer() { put(float.class, new ArgProducer() {