File tree Expand file tree Collapse file tree
google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -730,14 +730,20 @@ public void serialization() {
730730 reserializeAndAssert (Value .float64Array (BrokenSerializationList .of (.1 , .2 , .3 )));
731731 reserializeAndAssert (Value .float64Array ((Iterable <Double >) null ));
732732
733- reserializeAndAssert (Value .stringArray (BrokenSerializationList .of ("a" , "b" )));
733+ BrokenSerializationList <String > of = BrokenSerializationList .of ("a" , "b" );
734+ reserializeAndAssert (Value .stringArray (of ));
734735 reserializeAndAssert (Value .stringArray (null ));
735736
736737 reserializeAndAssert (
737738 Value .bytesArray (BrokenSerializationList .of (newByteArray ("a" ), newByteArray ("b" ))));
738739 reserializeAndAssert (Value .bytesArray (null ));
739740 }
740741
742+ @ Test (expected = IllegalStateException .class )
743+ public void verifyBrokenSerialization () {
744+ reserializeAndAssert (BrokenSerializationList .of (1 , 2 , 3 ));
745+ }
746+
741747 private static class BrokenSerializationList <T > extends ForwardingList <T > implements
742748 Serializable {
743749 private final List <T > delegate ;
You can’t perform that action at this time.
0 commit comments