File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/springframework/data/couchbase/transaction Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public boolean isCompleted() {
179179 };
180180
181181 // 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 () )))
183183 .flatMap (ignore -> Flux .from (callback .doInTransaction (status )).doOnNext (v -> out .add (v ))
184184 .then (Mono .defer (() -> {
185185 if (status .isRollbackOnly ()) {
@@ -304,7 +304,8 @@ static private Object getSecurityContext() {
304304 .forName ("org.springframework.security.core.context.SecurityContextHolder" );
305305 return securityContextHolderClass .getMethod ("getContext" ).invoke (null );
306306 } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
307- | InvocationTargetException cnfe ) {}
307+ | InvocationTargetException cnfe ) {
308+ }
308309 return null ;
309310 }
310311
You can’t perform that action at this time.
0 commit comments