Cleanup and dceprecation removal in core

This commit is contained in:
Oleg Zhurakousky
2023-10-10 13:12:32 +02:00
parent d650f9e1e8
commit f811ed0b7c
3 changed files with 3 additions and 22 deletions

View File

@@ -126,7 +126,7 @@ public class BinderChildContextInitializer implements ApplicationContextAware, B
* @param childContextInitializers the child context initializers to use
* @return copy of this instance that uses the AOT generated child context initializers
*/
@SuppressWarnings({"unused", "raw"})
@SuppressWarnings({"unchecked"})
public BinderChildContextInitializer withChildContextInitializers(
Map<String, ApplicationContextInitializer<? extends ConfigurableApplicationContext>> childContextInitializers) {
this.logger.debug(() -> "Replacing instance w/ one that uses child context initializers");

View File

@@ -16,7 +16,6 @@
package org.springframework.cloud.stream.converter;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
@@ -24,7 +23,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonEncoding;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -131,23 +129,6 @@ public class CompositeMessageConverterFactory {
this.converters.add(new ObjectStringMessageConverter());
}
/**
* Determine the JSON encoding to use for the given content type.
* @param contentType the MIME type from the MessageHeaders, if any
* @return the JSON encoding to use (never {@code null})
*/
private JsonEncoding getJsonEncoding(@Nullable MimeType contentType) {
if (contentType != null && contentType.getCharset() != null) {
Charset charset = contentType.getCharset();
for (JsonEncoding encoding : JsonEncoding.values()) {
if (charset.name().equals(encoding.getJavaName())) {
return encoding;
}
}
}
return JsonEncoding.UTF8;
}
/**
* Creation method.
* @param mimeType the target MIME type

View File

@@ -252,7 +252,7 @@ public class FunctionConfiguration {
return outputName;
}).get();
IntegrationFlow postProcessedFlow = (IntegrationFlow) context.getAutowireCapableBeanFactory()
.applyBeanPostProcessorsBeforeInitialization(integrationFlow, integrationFlowName);
.initializeBean(integrationFlow, integrationFlowName);
context.registerBean(integrationFlowName, IntegrationFlow.class, () -> postProcessedFlow);
}
else {
@@ -269,7 +269,7 @@ public class FunctionConfiguration {
})
.get();
IntegrationFlow postProcessedFlow = (IntegrationFlow) context.getAutowireCapableBeanFactory()
.applyBeanPostProcessorsBeforeInitialization(integrationFlow, integrationFlowName);
.initializeBean(integrationFlow, integrationFlowName);
context.registerBean(integrationFlowName, IntegrationFlow.class, () -> postProcessedFlow);
}
}