You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Kengo Seki (JIRA)" <ji...@apache.org> on 2015/07/06 14:15:05 UTC

[jira] [Updated] (HADOOP-12188) javac warning file is always empty on ant-based projects

     [ https://issues.apache.org/jira/browse/HADOOP-12188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kengo Seki updated HADOOP-12188:
--------------------------------
    Attachment: HADOOP-12188.HADOOP-12111.01.patch

Attaching a patch. Without this patch, javac warning is not detected while javadoc warning is:

{code}
[sekikn@localhost hadoop]$ cat ~/pig.patch                                                                                              
diff --git a/src/org/apache/pig/Main.java b/src/org/apache/pig/Main.java
index cc92dfa..cddbb88 100644
--- a/src/org/apache/pig/Main.java
+++ b/src/org/apache/pig/Main.java
@@ -92,7 +92,7 @@ import org.joda.time.Duration;
 import org.joda.time.Period;
 import org.joda.time.PeriodType;
 import org.joda.time.format.PeriodFormat;
-
+import sun.misc.Unsafe;
 /**
  * Main class for Pig engine.
  */
@@ -171,7 +171,7 @@ public class Main {
      *            -jar can be used to add additional jar files (colon separated). - will start a
      *            shell. -e will execute the rest of the command line as if it was input to the
      *            shell.
-     * @throws IOException
+     * @throws
      */
     public static void main(String args[]) {
         System.exit(run(args, null));
[sekikn@localhost hadoop]$ dev-support/test-patch.sh --basedir=../pig --project=pig --resetrepo ~/pig.patch                             

(snip)

| Vote |      Subsystem |  Runtime   | Comment
============================================================================
|  +1  |         javac  |  1m 21s    | trunk passed 
|  +1  |       javadoc  |  2m 2s     | trunk passed 
|  +1  |       @author  |  0m 0s     | The patch does not contain any @author 
|      |                |            | tags.
|  -1  |    test4tests  |  0m 0s     | The patch doesn't appear to include any 
|      |                |            | new or modified tests. Please justify why
|      |                |            | no new tests are needed for this patch.
|      |                |            | Also please list what manual steps were
|      |                |            | performed to verify this patch.
|  +1  |    checkstyle  |  1m 16s    | trunk passed 
|  +1  |         javac  |  1m 20s    | the patch passed 
|  -1  |       javadoc  |  1m 59s    | Patched . generated 2 additional warning 
|      |                |            | messages.
|  +1  |    asflicense  |  0m 32s    | Patch does not generate ASF License 
|      |                |            | warnings.
|  +1  |    checkstyle  |  1m 15s    | the patch passed 
|  +1  |    whitespace  |  0m 0s     | Patch has no whitespace issues. 
|  +1  |      findbugs  |  5m 37s    | the patch passed 
|      |                |  21m 3s    | 
{code}

Applying this patch makes javac warnings to be detected.

{code}
[sekikn@localhost hadoop]$ dev-support/test-patch.sh --basedir=../pig --project=pig --resetrepo ~/pig.patch 

(snip)

| Vote |      Subsystem |  Runtime   | Comment
============================================================================
|  +1  |         javac  |  1m 22s    | trunk passed 
|  +1  |       javadoc  |  1m 58s    | trunk passed 
|  +1  |       @author  |  0m 0s     | The patch does not contain any @author 
|      |                |            | tags.
|  -1  |    test4tests  |  0m 0s     | The patch doesn't appear to include any 
|      |                |            | new or modified tests. Please justify why
|      |                |            | no new tests are needed for this patch.
|      |                |            | Also please list what manual steps were
|      |                |            | performed to verify this patch.
|  +1  |    checkstyle  |  1m 15s    | trunk passed 
|  -1  |         javac  |  1m 18s    | Patched root generated 1 additional 
|      |                |            | warning messages.
|  -1  |       javadoc  |  2m 0s     | Patched root generated 2 additional 
|      |                |            | warning messages.
|  +1  |    asflicense  |  0m 32s    | Patch does not generate ASF License 
|      |                |            | warnings.
|  +1  |    checkstyle  |  1m 14s    | the patch passed 
|  +1  |    whitespace  |  0m 0s     | Patch has no whitespace issues. 
|  +1  |      findbugs  |  5m 42s    | the patch passed 
|      |                |  21m 4s    | 
{code}

> javac warning file is always empty on ant-based projects
> --------------------------------------------------------
>
>                 Key: HADOOP-12188
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12188
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>            Reporter: Kengo Seki
>         Attachments: HADOOP-12188.HADOOP-12111.01.patch
>
>
> (branch|patch)-javac-root-warning.txt is always empty though there are some warnings on ant-based projects, because check_patch_javac filters warning messages as follows:
> {code}
>       if [[ -f "${PATCH_DIR}/branch-javac-${fn}.txt" ]]; then                                                                                 
>         ${GREP} '\[WARNING\]' "${PATCH_DIR}/branch-javac-${fn}.txt" \                                                                         
>           > "${PATCH_DIR}/branch-javac-${fn}-warning.txt"                                                                                     
>       else                                                                                                                                    
>         touch "${PATCH_DIR}/branch-javac-${fn}.txt" \                                                                                         
>           "${PATCH_DIR}/branch-javac-${fn}-warning.txt"                                                                                       
>       fi                                                                                                                                      
>                                                                                                                                               
>       ${GREP} '\[WARNING\]' "${PATCH_DIR}/patch-javac-${fn}.txt" \                                                                            
>         > "${PATCH_DIR}/patch-javac-${fn}-warning.txt"                                                                                        
> {code}
> But ant's warning output format is as follows:
> {code}
> [javac] /home/sekikn/pig/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java:64: warning: [deprecation] ComparisonFunc in org.apache.pig has been deprecated
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)