V650. Type casting is used 2 times in a row. The '+' operation is executed. Probably meant: (T1)((T2)a + b). V651. Suspicious operation of 'sizeof(X)/sizeof(T)' kind, where 'X' is of the 'class' type. V652. Operation is executed 3 or more times in a row. V653. ...
because subclass will(or might) have always more functionality compare to the Superclass. So, we need to be more careful when we use the down casting. We will use the same ANIMAL Superclass and LION subclass as per the blog post –ABAP Objects: Narrowing Cast ...
public static void main(java.lang.String[]); Code: 0: iconst_1 1: istore_0 2: bipush 10 4: newarray boolean 6: astore_1 7: iload_0 8: iconst_m1 9: if_icmple 22 12: aload_1 13: checkcast #5; //class "[I" ### casting boolean array to int array ! 16: iload_0 17: ...
fun testTypesCastingDataClassWithSimpleValues(data: BsonDocument) { val expectedDataClass = DataClassWithSimpleValues('c', 1, 2, 10, 10L, 2.0f, 3.0, true, "String") assertDecodesTo(data, expectedDataClass) } @Test 2 changes: 1 addition & 1 deletion 2 bson/src/main/org/bson/codecs/...