Bug: Fix compilation warning in RandomSchemaTest
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 10/Aug/23 08:44
Resolved: 10/Aug/23 13:40

There are compilation warning for RandomSchemaTest and it just pollutes the ant build log unnecessarily. We should just fix it. The fix is about casting the objects to execute method to (Object[]).

{code}
_build-test:
    [javac] Compiling 1874 source files to /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/build/test/classes
    [javac] Note: Processing compiler hints annotations
    [javac] Note: Processing compiler hints annotations
    [javac] Note: Processing compiler hints annotations
    [javac] Note: Writing compiler command file at META-INF/hotspot_compiler
    [javac] Note: Done processing compiler hints annotations
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:131: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     execute(insertStmt, expected);
    [javac]                                         ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:133: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRows(execute(selectStmt, rowKey), expected);
    [javac]                                                    ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:134: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRows(execute(tokenStmt, partitionKeys), partitionKeys);
    [javac]                                                   ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:135: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRowsNet(executeNet(selectStmt, rowKey), expected);
    [javac]                                                          ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:140: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRows(execute(selectStmt, rowKey), expected);
    [javac]                                                    ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:141: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRows(execute(tokenStmt, partitionKeys), partitionKeys);
    [javac]                                                   ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning
    [javac] /home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-5.0/test/unit/org/apache/cassandra/cql3/RandomSchemaTest.java:142: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac]                     assertRowsNet(executeNet(selectStmt, rowKey), expected);
    [javac]                                                          ^
    [javac]   cast to Object for a varargs call
    [javac]   cast to Object[] for a non-varargs call and to suppress this warning

{code}