Skip to content

Commit 6e5e063

Browse files
committed
Update code to meet code review requirements
1 parent 4788f5e commit 6e5e063

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,9 @@ public CompositeCodec(Map<Class<?>, Codec> delegates, Codec defaultCodec) {
4444
}
4545

4646
/**
47-
* @since 7.0
48-
*
49-
* @deprecated This constructor is deprecated because the delegates map must contain at least one entry.
50-
* Creating a {@code CompositeCodec} without any delegates is not a valid use case, as there would be
51-
* no codecs to delegate to for encoding or decoding operations. Please use the constructor that accepts
52-
* a non-empty delegates map to ensure proper delegation behavior.
53-
*
47+
* @deprecated since 7.0 in favor of {@link #CompositeCodec(Map, Codec)}.
5448
*/
55-
@Deprecated
49+
@Deprecated(since = "7.0", forRemoval = true)
5650
public CompositeCodec(Codec defaultCodec) {
5751
this(Map.of(), defaultCodec);
5852
}
@@ -83,7 +77,6 @@ public <T> T decode(byte[] bytes, Class<T> type) throws IOException {
8377
}
8478

8579
private Codec findDelegate(Class<?> type) {
86-
Assert.state(!this.delegates.isEmpty(), "Delegates must not be empty");
8780
Class<?> clazz = ClassUtils.findClosestMatch(type, this.delegates.keySet(), false);
8881
Codec codec = this.delegates.get(clazz);
8982
if (codec == null) {

0 commit comments

Comments
 (0)