Hello, I found an NullPointerException Risk at line 151 of site.ycsb.BasicTSDB.
@Override
public Status update(String table, String key, Map<String, ByteIterator> values) {
// ...
if (verbose) {
// ...
if (values != null) {// check values here
final TreeMap<String, ByteIterator> tree = new TreeMap<String, ByteIterator>(values);
// ...
}
if (count) {
if (!verbose) {
isFloat = ((NumericByteIterator) values.get(valueKey)).isFloatingPoint(); // values could be null here
// suggested: isFloat = values == null? false:((NumericByteIterator) values.get(valueKey)).isFloatingPoint();
}
// ...
}
return Status.OK;
}
The variable values could be null and has two usages, but only the first usage is guarded by a null check, the second isn't. Hope this suggestion is helpful!
Hello, I found an NullPointerException Risk at line 151 of
site.ycsb.BasicTSDB
.The variable
values
could be null and has two usages, but only the first usage is guarded by a null check, the second isn't. Hope this suggestion is helpful!