Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public boolean isCompleted() {
};

// Get caller's resources, set SecurityContext for the transaction
return CouchbaseResourceOwner.get().map(cbrh -> setSecurityContext(cbrh.get().getSecurityContext()))
return CouchbaseResourceOwner.get().map(cbrh -> cbrh.map( c -> setSecurityContext(c.getSecurityContext())))
.flatMap(ignore -> Flux.from(callback.doInTransaction(status)).doOnNext(v -> out.add(v))
.then(Mono.defer(() -> {
if (status.isRollbackOnly()) {
Expand Down Expand Up @@ -304,7 +304,8 @@ static private Object getSecurityContext() {
.forName("org.springframework.security.core.context.SecurityContextHolder");
return securityContextHolderClass.getMethod("getContext").invoke(null);
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
| InvocationTargetException cnfe) {}
| InvocationTargetException cnfe) {
}
return null;
}

Expand Down
Loading