File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core
spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -445,18 +445,19 @@ else if (this.namedQuery != null) {
445445 }
446446
447447 private Object executeOutboundJpaOperationOnPersistentMode (Message <?> message ) {
448+ Object payload = message .getPayload ();
448449 switch (this .persistMode ) {
449450 case PERSIST :
450- this .jpaOperations .persist (message . getPayload () , this .flushSize , this .clearOnFlush );
451- return message . getPayload () ;
451+ this .jpaOperations .persist (payload , this .flushSize , this .clearOnFlush );
452+ return payload ;
452453 case MERGE :
453- return this .jpaOperations .merge (message . getPayload () , this .flushSize , this .clearOnFlush );
454+ return this .jpaOperations .merge (payload , this .flushSize , this .clearOnFlush );
454455 case DELETE :
455- this .jpaOperations .delete (message . getPayload () );
456+ this .jpaOperations .delete (payload );
456457 if (this .flush ) {
457458 this .jpaOperations .flush ();
458459 }
459- return message . getPayload () ;
460+ return payload ;
460461 default :
461462 throw new IllegalStateException ("Unsupported PersistMode: " + this .persistMode .name ());
462463 }
Original file line number Diff line number Diff line change 1616
1717package org .springframework .integration .rsocket .outbound ;
1818
19+ import java .util .Arrays ;
1920import java .util .Map ;
2021
2122import org .reactivestreams .Publisher ;
@@ -95,9 +96,11 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler
9596 * @param route the RSocket endpoint route to use.
9697 * @param routeVariables the variables to expand route template.
9798 */
98- public RSocketOutboundGateway (String route , Object ... routeVariables ) {
99+ public RSocketOutboundGateway (String route , @ Nullable Object ... routeVariables ) {
99100 this (new ValueExpression <>(route ));
100- this .routeVars = routeVariables ;
101+ if (routeVariables != null ) {
102+ this .routeVars = Arrays .copyOf (routeVariables , routeVariables .length );
103+ }
101104 }
102105
103106 /**
You can’t perform that action at this time.
0 commit comments