Stefan Miklosovic created CASSANDRA-18740:
---------------------------------------------

             Summary: Fix compilation warning in RandomSchemaTest
                 Key: CASSANDRA-18740
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18740
             Project: Cassandra
          Issue Type: Bug
          Components: Test/unit
            Reporter: Stefan Miklosovic
            Assignee: Stefan Miklosovic


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}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to