Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18740

Fix compilation warning in RandomSchemaTest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-alpha1, 5.0, 5.1
    • Test/unit
    • None

    Description

      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[]).

      _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
      
      

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              smiklosovic Stefan Miklosovic
              Stefan Miklosovic
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h