"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-messaging/src/main/java/org/springframework/messaging/simp/broker/OrderedMessageChannelDecorator.java" between
spring-framework-5.3.23.tar.gz and spring-framework-5.3.24.tar.gz

About: Spring Framework is an application framework for the Java platform and .NET Framework. Community edition.

OrderedMessageChannelDecorator.java  (spring-framework-5.3.23):OrderedMessageChannelDecorator.java  (spring-framework-5.3.24)
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* https://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
skipping to change at line 148 skipping to change at line 148
/** /**
* Install or remove an {@link ExecutorChannelInterceptor} that invokes a * Install or remove an {@link ExecutorChannelInterceptor} that invokes a
* completion task, if found in the headers of the message. * completion task, if found in the headers of the message.
* @param channel the channel to configure * @param channel the channel to configure
* @param preserveOrder whether preserve the order or publication; when * @param preserveOrder whether preserve the order or publication; when
* "true" an interceptor is inserted, when "false" it removed. * "true" an interceptor is inserted, when "false" it removed.
*/ */
public static void configureInterceptor(MessageChannel channel, boolean p reserveOrder) { public static void configureInterceptor(MessageChannel channel, boolean p reserveOrder) {
if (preserveOrder) { if (preserveOrder) {
Assert.isInstanceOf(ExecutorSubscribableChannel.class, ch annel, Assert.isInstanceOf(ExecutorSubscribableChannel.class, ch annel,
"An ExecutorSubscribableChannel is requir ed for `preservePublishOrder`"); "An ExecutorSubscribableChannel is requir ed for 'preservePublishOrder'");
ExecutorSubscribableChannel execChannel = (ExecutorSubscr ibableChannel) channel; ExecutorSubscribableChannel execChannel = (ExecutorSubscr ibableChannel) channel;
if (execChannel.getInterceptors().stream().noneMatch(i -> i instanceof CallbackInterceptor)) { if (execChannel.getInterceptors().stream().noneMatch(i -> i instanceof CallbackInterceptor)) {
execChannel.addInterceptor(0, new CallbackInterce ptor()); execChannel.addInterceptor(0, new CallbackInterce ptor());
} }
} }
else if (channel instanceof ExecutorSubscribableChannel) { else if (channel instanceof ExecutorSubscribableChannel) {
ExecutorSubscribableChannel execChannel = (ExecutorSubscr ibableChannel) channel; ExecutorSubscribableChannel execChannel = (ExecutorSubscr ibableChannel) channel;
execChannel.getInterceptors().stream().filter(i -> i inst anceof CallbackInterceptor) execChannel.getInterceptors().stream().filter(i -> i inst anceof CallbackInterceptor)
.findFirst().map(execChannel::removeInter ceptor); .findFirst().map(execChannel::removeInter ceptor);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)