You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Jakob Homan (JIRA)" <ji...@apache.org> on 2009/05/26 23:33:45 UTC
[jira] Created: (HADOOP-5917) Testpatch isn't catching newly
introduced javac warnings
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.
[jira] Commented: (HADOOP-5917) Testpatch isn't catching newly
introduced javac warnings
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713689#action_12713689 ]
Jakob Homan commented on HADOOP-5917:
-------------------------------------
Two options would be either remove the maxwarns restriction, which would generate quite a lot of warnings now due to the mapred/mapreduce deprecation issue, or to explicitly ignore the deprecation warnings in lint. Another option, which Nicholas mentioned, is to wait for the project split and see if there's a new testpatch script that will be more accurate against hdfs. This seems reasonable to me.
> 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.
[jira] Assigned: (HADOOP-5917) Testpatch isn't catching newly
introduced javac warnings
Posted by "Nigel Daley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5917?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nigel Daley reassigned HADOOP-5917:
-----------------------------------
Assignee: Giridharan Kesavan
> 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
> Assignee: Giridharan Kesavan
>
> 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.
[jira] Commented: (HADOOP-5917) Testpatch isn't catching newly
introduced javac warnings
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ 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:
{code}
--- 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 {
sendBuf.reset();
recvBuf.reset();
sendOut.writeShort((short)DataTransferProtocol.DATA_TRANSFER_VERSION);
- sendOut.writeByte(DataTransferProtocol.OP_WRITE_BLOCK);
+ sendOut.writeByte((byte)DataTransferProtocol.OP_WRITE_BLOCK);
sendOut.writeLong(newBlockId);
sendOut.writeLong(0); // generation stamp
sendOut.writeInt(0); // targets in pipeline
{code}
This indeed is flagged as a warning when running with the lint parameter:
{noformat}
[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);
{noformat}
However, testpatch gives this patch a clean bill of health:
{noformat}
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 3 new or modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
{noformat}
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.
[jira] Commented: (HADOOP-5917) Testpatch isn't catching newly
introduced javac warnings
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713308#action_12713308 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-5917:
------------------------------------------------
It seems that test-patch only checks the first 1000 warnings since the javac args include "-Xmaxwarns 1000".
> 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.