@@ -440,21 +440,25 @@ else if (this.namedQuery != null) {
440440 return this .jpaOperations .executeUpdateWithNamedQuery (this .namedQuery , paramSource );
441441 }
442442 else {
443- switch (this .persistMode ) {
444- case PERSIST :
445- this .jpaOperations .persist (message .getPayload (), this .flushSize , this .clearOnFlush );
446- return message .getPayload ();
447- case MERGE :
448- return this .jpaOperations .merge (message .getPayload (), this .flushSize , this .clearOnFlush );
449- case DELETE :
450- this .jpaOperations .delete (message .getPayload ());
451- if (this .flush ) {
452- this .jpaOperations .flush ();
453- }
454- return message .getPayload ();
455- default :
456- throw new IllegalStateException ("Unsupported PersistMode: " + this .persistMode .name ());
457- }
443+ return executeOutboundJpaOperationOnPersistentMode (message );
444+ }
445+ }
446+
447+ private Object executeOutboundJpaOperationOnPersistentMode (Message <?> message ) {
448+ switch (this .persistMode ) {
449+ case PERSIST :
450+ this .jpaOperations .persist (message .getPayload (), this .flushSize , this .clearOnFlush );
451+ return message .getPayload ();
452+ case MERGE :
453+ return this .jpaOperations .merge (message .getPayload (), this .flushSize , this .clearOnFlush );
454+ case DELETE :
455+ this .jpaOperations .delete (message .getPayload ());
456+ if (this .flush ) {
457+ this .jpaOperations .flush ();
458+ }
459+ return message .getPayload ();
460+ default :
461+ throw new IllegalStateException ("Unsupported PersistMode: " + this .persistMode .name ());
458462 }
459463 }
460464
@@ -591,7 +595,8 @@ private int evaluateExpressionForNumericResult(@Nullable final Message<?> reques
591595
592596 int evaluatedResult = 0 ;
593597 if (expression != null ) {
594- Object evaluationResult = expression .getValue (this .evaluationContext , requestMessage ); // NOSONAR can be null
598+ Object evaluationResult = expression .getValue (this .evaluationContext , requestMessage ); // NOSONAR can be
599+ // null
595600 if (evaluationResult != null ) {
596601 if (evaluationResult instanceof Number ) {
597602 evaluatedResult = ((Number ) evaluationResult ).intValue ();
0 commit comments