Skip to content

Commit da6e49d

Browse files
authored
fix: Fix JSONRPCVoidResponseSerializer constructor (#193)
# Description - [X] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [X] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [X] Ensure the tests pass - [X] Appropriate READMEs were updated (if necessary)
1 parent 93d6bae commit da6e49d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

spec/src/main/java/io/a2a/spec/JSONRPCVoidResponseSerializer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@
55
import com.fasterxml.jackson.core.JsonGenerator;
66
import com.fasterxml.jackson.databind.SerializerProvider;
77
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
8+
import com.fasterxml.jackson.databind.type.TypeFactory;
89

910
public class JSONRPCVoidResponseSerializer extends StdSerializer<JSONRPCResponse<Void>> {
1011

1112
private static final JSONRPCErrorSerializer JSON_RPC_ERROR_SERIALIZER = new JSONRPCErrorSerializer();
1213

1314
public JSONRPCVoidResponseSerializer() {
14-
this(null);
15-
}
16-
17-
public JSONRPCVoidResponseSerializer(Class<JSONRPCResponse<Void>> vc) {
18-
super(vc);
15+
super(TypeFactory.defaultInstance().constructParametricType(JSONRPCResponse.class,
16+
Void.class));
1917
}
2018

2119
@Override

0 commit comments

Comments
 (0)