Skip to content

Commit

Permalink
Remove deprecations from previous versions
Browse files Browse the repository at this point in the history
* Remove Boon dependency and its usage
* Remove overloaded methods from the `IntegrationFlowDefinition`
- we can simply rely now on the super class
* Remove (or rework) deprecated entities in the docs
* Fix tests for removed deprecated APIs
* Rework affected tests to JUnit 5
  • Loading branch information
artembilan authored and garyrussell committed Jan 9, 2020
1 parent cfaabe2 commit 370e943
Show file tree
Hide file tree
Showing 47 changed files with 133 additions and 2,687 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Expand Up @@ -50,7 +50,6 @@ ext {
assertjVersion = '3.14.0'
assertkVersion = '0.20'
awaitilityVersion = '4.0.1'
boonVersion = '0.34'
commonsDbcp2Version = '2.7.0'
commonsIoVersion = '2.6'
commonsNetVersion = '3.6'
Expand Down Expand Up @@ -411,7 +410,6 @@ project('spring-integration-core') {
api 'io.projectreactor:reactor-core'
optionalApi 'com.fasterxml.jackson.core:jackson-databind'
optionalApi "com.jayway.jsonpath:json-path:$jsonpathVersion"
optionalApi "io.fastjson:boon:$boonVersion"
optionalApi "com.esotericsoftware:kryo-shaded:$kryoShadedVersion"
optionalApi "io.micrometer:micrometer-core:$micrometerVersion"
optionalApi "io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion"
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -314,16 +314,6 @@ public void setTransactionManager(PlatformTransactionManager transactionManager)
this.transactionManager = transactionManager;
}

/**
* Specify a batch size for consumer.
* @param txSize the batch size to use
* @deprecated since 5.2 in favor of {@link #setBatchSize(Integer)}
*/
@Deprecated
public void setTxSize(int txSize) {
setBatchSize(txSize);
}

public void setBatchSize(Integer batchSize) {
this.batchSize = batchSize;
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -202,17 +202,6 @@ public S transactionManager(PlatformTransactionManager transactionManager) {
return _this();
}

/**
* Configure the txSize.
* @param txSize the txSize.
* @return the spec.
* @deprecated since 5.2 in favor of {@link #batchSize(int)}
*/
@Deprecated
public S txSize(int txSize) {
return batchSize(txSize);
}

/**
* Configure the batch size.
* @param batchSize the batchSize.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -107,17 +107,6 @@ public SimpleMessageListenerContainerSpec receiveTimeout(long receiveTimeout) {
return this;
}

/**
* @param txSize the txSize.
* @return the spec.
* @see SimpleMessageListenerContainer#setBatchSize(int)
* @deprecated since 5.2 in favor of {@link #batchSize(int)}
*/
@Deprecated
public SimpleMessageListenerContainerSpec txSize(int txSize) {
return batchSize(txSize);
}

/**
* The batch size to use.
* @param batchSize the batchSize.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -79,14 +79,6 @@ public MessagePublishingInterceptor(PublisherMetadataSource metadataSource) {
this.metadataSource = metadataSource;
}

/**
* @param metadataSource the {@link PublisherMetadataSource} to use.
* @deprecated since 5.2 in favor constructor argument.
*/
@Deprecated
public void setPublisherMetadataSource(PublisherMetadataSource metadataSource) {
}

/**
* @param defaultChannelName the default channel name.
* @since 4.0.3
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,6 +51,7 @@
import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.InterceptableChannel;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

Expand All @@ -68,7 +69,7 @@
@IntegrationManagedResource
@SuppressWarnings("deprecation")
public abstract class AbstractMessageChannel extends IntegrationObjectSupport
implements MessageChannel, TrackableComponent, ChannelInterceptorAware,
implements MessageChannel, TrackableComponent, InterceptableChannel,
org.springframework.integration.support.management.MessageChannelMetrics,
ConfigurableMetricsAware<AbstractMessageChannelMetrics>,
IntegrationPattern {
Expand Down

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,10 @@

package org.springframework.integration.channel;

import org.springframework.messaging.support.InterceptableChannel;

/**
* The {@link ChannelInterceptorAware} extension for the cases when
* The {@link InterceptableChannel} extension for the cases when
* the {@link org.springframework.messaging.support.ExecutorChannelInterceptor}s
* may have reason (e.g. {@link ExecutorChannel} or {@link QueueChannel})
* and the implementors require to know if they should make the
Expand All @@ -28,8 +30,7 @@
*
* @since 4.2
*/
@SuppressWarnings("deprecation")
public interface ExecutorChannelInterceptorAware extends ChannelInterceptorAware {
public interface ExecutorChannelInterceptorAware extends InterceptableChannel {

boolean hasExecutorInterceptors();

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -179,32 +179,6 @@ protected IntegrationFlowDefinition<?> from(MessagingGatewaySpec<?, ?> inboundGa
return IntegrationFlows.from(inboundGatewaySpec);
}

/**
* @param service service for polling method
* @param methodName method to poll
* @return the IntegrationFlowBuilder
* @deprecated since 5.2 in favor of method reference via {@link #from(Supplier)}
*/
@Deprecated
protected IntegrationFlowBuilder from(Object service, String methodName) {
return IntegrationFlows.from(service, methodName);
}

/**
*
* @param service service for polling method
* @param methodName method to poll
* @param endpointConfigurer configurer for {@link SourcePollingChannelAdapterSpec}
* @return the IntegrationFlowBuilder
* @deprecated since 5.2 in favor of method reference via {@link #from(Supplier)}
*/
@Deprecated
protected IntegrationFlowBuilder from(Object service, String methodName,
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) {

return IntegrationFlows.from(service, methodName, endpointConfigurer);
}

protected <T> IntegrationFlowBuilder from(Supplier<T> messageSource) {
return IntegrationFlows.from(messageSource);
}
Expand All @@ -219,18 +193,6 @@ protected IntegrationFlowBuilder from(Class<?> serviceInterface) {
return IntegrationFlows.from(serviceInterface);
}

/**
* Start a flow from a proxy for the service interface.
* @param serviceInterface the service interface to proxy for the gateway.
* @param beanName the bean name for the gateway proxy.
* @return the {@link IntegrationFlowBuilder} instance
* @deprecated since 5.2 in favor of {@link #from(Class, Consumer)}
*/
@Deprecated
protected IntegrationFlowBuilder from(Class<?> serviceInterface, @Nullable String beanName) {
return from(serviceInterface, (gateway) -> gateway.beanName(beanName));
}

/**
* Start a flow from a proxy for the service interface.
* @param serviceInterface the service interface class.
Expand Down

0 comments on commit 370e943

Please sign in to comment.