hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5917) Testpatch isn't catching newly introduced javac warnings
Date Tue, 26 May 2009 21:33:46 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-5917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713267#action_12713267

Jakob Homan commented on HADOOP-5917:

As part of the recent cleanup, I fixed all of the warnings in the TestDataTransferProtcol
(HADOOP-5822).  This has been applied to trunk.  To test if testpatch is working correctly,
I re-introduced a minor javac warning, a redundant cast:
--- src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
+++ src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
@@ -194,7 +194,7 @@ public class TestDataTransferProtocol extends TestCase {
-    sendOut.writeByte(DataTransferProtocol.OP_WRITE_BLOCK);
+    sendOut.writeByte((byte)DataTransferProtocol.OP_WRITE_BLOCK);
     sendOut.writeLong(0);          // generation stamp
     sendOut.writeInt(0);           // targets in pipeline 
This indeed is flagged as a warning when running with the lint parameter:
    [javac] /Users/jhoman/work/git/hadoop/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java:197:
warning: [cast] redundant cast to byte
    [javac]     sendOut.writeByte((byte)DataTransferProtocol.OP_WRITE_BLOCK);

However, testpatch gives this patch a clean bill of health:
     [exec] +1 overall.  
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
     [exec]     +1 release audit.  The applied patch does not increase the total number of
release audit warnings.
Perhaps the section of test-patch that calculates the difference in warnings got silently
broken?  Fixing this will hopefully prevent another round of spring cleaning next year.

> Testpatch isn't catching newly introduced javac warnings
> --------------------------------------------------------
>                 Key: HADOOP-5917
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5917
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: test
>            Reporter: Jakob Homan
> Testpatch doesn't seem to be catching newly introduced javac warnings, as detailed in
the results of the experiment below.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message