mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
restore buffer auto-sizing, with null guard
This commit is contained in:
parent
d357f761d7
commit
a57b769745
@ -61,11 +61,13 @@ public class StringCompositor implements LongFunction<String> {
|
|||||||
spans[spans.length-1]=even_odd_spans[even_odd_spans.length-1];
|
spans[spans.length-1]=even_odd_spans[even_odd_spans.length-1];
|
||||||
this.stringfunc = stringfunc;
|
this.stringfunc = stringfunc;
|
||||||
|
|
||||||
// int minsize = 0;
|
int minsize = 0;
|
||||||
// for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
// String result = apply(i);
|
String result = apply(i);
|
||||||
// minsize = Math.max(minsize,result.length());
|
if (result!=null) {
|
||||||
// }
|
minsize = Math.max(minsize,result.length());
|
||||||
|
}
|
||||||
|
}
|
||||||
bufsize = spans.length*1024;
|
bufsize = spans.length*1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user