Skip to content

Commit

Permalink
Cleanup and dceprecation removal in core
Browse files Browse the repository at this point in the history
  • Loading branch information
olegz committed Oct 10, 2023
1 parent d650f9e commit f811ed0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void ensureBinderFactoryIsSet() {
* @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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

package org.springframework.cloud.stream.converter;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
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;
Expand Down Expand Up @@ -131,23 +129,6 @@ protected boolean supports(Class<?> clazz) {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void afterPropertiesSet() throws Exception {
return outputName;
}).get();
IntegrationFlow postProcessedFlow = (IntegrationFlow) context.getAutowireCapableBeanFactory()
.applyBeanPostProcessorsBeforeInitialization(integrationFlow, integrationFlowName);
.initializeBean(integrationFlow, integrationFlowName);
context.registerBean(integrationFlowName, IntegrationFlow.class, () -> postProcessedFlow);
}
else {
Expand All @@ -269,7 +269,7 @@ public void afterPropertiesSet() throws Exception {
})
.get();
IntegrationFlow postProcessedFlow = (IntegrationFlow) context.getAutowireCapableBeanFactory()
.applyBeanPostProcessorsBeforeInitialization(integrationFlow, integrationFlowName);
.initializeBean(integrationFlow, integrationFlowName);
context.registerBean(integrationFlowName, IntegrationFlow.class, () -> postProcessedFlow);
}
}
Expand Down

0 comments on commit f811ed0

Please sign in to comment.