GH-3968: public IntObjSupp.setConversionService

Fixes https://github.com/spring-projects/spring-integration/issues/3968

The `IntegrationObjectSupport.setConversionService()` is protected by accident
This commit is contained in:
abilan
2023-02-22 10:37:31 -05:00
parent ca7736d2a6
commit c8e171c0cd
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 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.
@@ -267,7 +267,7 @@ public abstract class IntegrationObjectSupport implements BeanNameAware, NamedCo
return this.conversionService;
}
protected void setConversionService(ConversionService conversionService) {
public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 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.
@@ -26,7 +26,7 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.core.convert.ConversionService;
@@ -40,11 +40,12 @@ import static org.mockito.Mockito.mock;
/**
* @author Gary Russell
* @author Artem Bilan
*
* @since 3.0
*
*/
public class RouterConcurrencyTest {
public class RouterConcurrencyTests {
@Test
public void test() throws Exception {
@@ -57,7 +58,7 @@ public class RouterConcurrencyTest {
}
@Override
protected void setConversionService(ConversionService conversionService) {
public void setConversionService(ConversionService conversionService) {
try {
if (count.incrementAndGet() > 1) {
Thread.sleep(20);