File tree 1 file changed +3
-2
lines changed
src/main/java/org/springframework/data/couchbase/transaction
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public boolean isCompleted() {
179
179
};
180
180
181
181
// Get caller's resources, set SecurityContext for the transaction
182
- return CouchbaseResourceOwner .get ().map (cbrh -> setSecurityContext ( cbrh .get () .getSecurityContext ()))
182
+ return CouchbaseResourceOwner .get ().map (cbrh -> cbrh .map ( c -> setSecurityContext ( c .getSecurityContext () )))
183
183
.flatMap (ignore -> Flux .from (callback .doInTransaction (status )).doOnNext (v -> out .add (v ))
184
184
.then (Mono .defer (() -> {
185
185
if (status .isRollbackOnly ()) {
@@ -304,7 +304,8 @@ static private Object getSecurityContext() {
304
304
.forName ("org.springframework.security.core.context.SecurityContextHolder" );
305
305
return securityContextHolderClass .getMethod ("getContext" ).invoke (null );
306
306
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
307
- | InvocationTargetException cnfe ) {}
307
+ | InvocationTargetException cnfe ) {
308
+ }
308
309
return null ;
309
310
}
310
311
You can’t perform that action at this time.
0 commit comments