aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Null pointer in LList exists #46

Closed ameykpatil closed 9 years ago

ameykpatil commented 9 years ago

This is the exists method. When corresponding key or llist is missing in Aerospike, list object at the 2nd line is null & hence list.size() at 3rd line throws Null Pointer exception.

public List<Boolean> exists(List<Value> keyValues) throws AerospikeException {
        List<?> list = (List<?>)client.execute(policy, key, PackageName, "exists", binName, Value.get(keyValues));
        List<Boolean> target = new ArrayList<Boolean>(list.size());

        for (Object obj : list) {
            target.add(Util.toBoolean(obj));
        }
        return target;
    }

Not sure if similar issues are there for other methods too.

BrianNichols commented 9 years ago

This will be fixed in the next release.