File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ private String convertImpl(Object input) {
287287
288288 @ Override
289289 public String serialize (Object input ) {
290- String result = convertImpl (input );
290+ String result = String . valueOf (input );
291291 if (result == null ) {
292292 throw new CoercingSerializeException (
293293 "Expected type 'ID' but was '" + typeName (input ) + "'."
Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ class ScalarsIDTest extends Specification {
5151 }
5252
5353 @Unroll
54- def " serialize throws exception for invalid input #value" () {
54+ def " serialize allows any object via String.valueOf #value" () {
5555 when :
5656 Scalars.GraphQLID . getCoercing(). serialize(value)
5757 then :
58- thrown( CoercingSerializeException )
58+ noExceptionThrown( )
5959
6060 where :
6161 value | _
You can’t perform that action at this time.
0 commit comments