Skip to content

Commit 5450281

Browse files
authored
GH-10197: Mark CompositeCodec(defaultCodec) ctor for deprecation
Fixes: #10197 Update deprecated ctor to use an empty map for delegates instead of null. **Auto-cherry-pick to `6.4.x`** * Fix `since` in the deprecated ctor * Add JavaDoc to the deprecated ctor
1 parent bc5210a commit 5450281

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spring-integration-core/src/main/java/org/springframework/integration/codec/CompositeCodec.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ public CompositeCodec(Map<Class<?>, Codec> delegates, Codec defaultCodec) {
4343
this.delegates = new HashMap<Class<?>, Codec>(delegates);
4444
}
4545

46+
/**
47+
* @param defaultCodec codec for fallback
48+
* @deprecated since 6.4.6 in favor of {@link #CompositeCodec(Map, Codec)} with provided delegates.
49+
*/
50+
@Deprecated(since = "6.4.6", forRemoval = true)
4651
public CompositeCodec(Codec defaultCodec) {
47-
this(null, defaultCodec);
52+
this.defaultCodec = defaultCodec;
53+
this.delegates = Map.of();
4854
}
4955

5056
@Override

0 commit comments

Comments
 (0)