Hadoop Common
  1. Hadoop Common
  2. HADOOP-5822

Fix javac warnings in several dfs tests related to unncessary casts

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      There are quite a few unnecessary casts as reported in javac in the following files:
      /src/test/OAH/hdfs/TestDataTransferProtocol.java
      /src/test/OAH/hdfs/TestFSInputChecker.java
      /src/test/OAH/hdfs/TestFileAppend.java
      /src/test/OAH/hdfs/TestPread.java
      /src/test/OAH/hdfs/server/namenode/TestNodeCount.java

        Activity

        Hide
        Tsz Wo Nicholas Sze added a comment -

        > Hudson seems to be messed up at the moment, I can't see the test results, but I'm sure there no issues with the contrib tests. There are no functional changes to the code from this patch.

        The patch only changed some hdfs unit tests. The failed contrib tests are definitely unrelated. BTW, some contrib tests already have a long history of failing (e.g. some have age 5 in build #337). Hope that they will be fixed soon.

        Show
        Tsz Wo Nicholas Sze added a comment - > Hudson seems to be messed up at the moment, I can't see the test results, but I'm sure there no issues with the contrib tests. There are no functional changes to the code from this patch. The patch only changed some hdfs unit tests. The failed contrib tests are definitely unrelated. BTW, some contrib tests already have a long history of failing (e.g. some have age 5 in build #337 ). Hope that they will be fixed soon.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this. Thanks, Jakob!

        Show
        Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Jakob!
        Hide
        Jakob Homan added a comment -

        Hudson seems to be messed up at the moment, I can't see the test results, but I'm sure there no issues with the contrib tests. There are no functional changes to the code from this patch.

        Show
        Jakob Homan added a comment - Hudson seems to be messed up at the moment, I can't see the test results, but I'm sure there no issues with the contrib tests. There are no functional changes to the code from this patch.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12408070/HADOOP-5822.patch
        against trunk revision 774859.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 18 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12408070/HADOOP-5822.patch against trunk revision 774859. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 18 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/340/console This message is automatically generated.
        Hide
        Jakob Homan added a comment -

        submitting patch

        Show
        Jakob Homan added a comment - submitting patch
        Hide
        Jakob Homan added a comment -

        Patch fixes all the javac warnings in the files listed above. All are unnecessary cast warnings. Also cleaned up some imports, dead code and formatting.

        Show
        Jakob Homan added a comment - Patch fixes all the javac warnings in the files listed above. All are unnecessary cast warnings. Also cleaned up some imports, dead code and formatting.

          People

          • Assignee:
            Jakob Homan
            Reporter:
            Jakob Homan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development