DATACOUCH-151 - Fixed NullPointerException on auto-boxing in CouchbaseTemplate.
Original pull request: #55.
This commit is contained in:
committed by
Oliver Gierke
parent
97df48533a
commit
6ae75c87b7
@@ -316,7 +316,8 @@ public class CouchbaseTemplate implements CouchbaseOperations, ApplicationEventP
|
||||
if (cas == CASResponse.EXISTS) {
|
||||
throw new OptimisticLockingFailureException("Saving document with version value failed: " + cas);
|
||||
} else {
|
||||
long newCas = casFuture.getCas();
|
||||
Long casValue = casFuture.getCas();
|
||||
long newCas = (casValue == null) ? 0 : casValue.longValue();
|
||||
accessor.setProperty(versionProperty, newCas);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user