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

Akira AJISAKA commented on HADOOP-11627:
----------------------------------------

Thank you Allen!

The number of checkstyle warnings was increased in ZlibFactory. (66 -> 68)
Newly introduced warnings are as follows:
{code}
<error line="48" column="3" severity="error" message="Missing a Javadoc 
comment." 
source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
<error line="62" column="3" severity="error" message="Missing a Javadoc 
comment." 
source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck"/>
<error line="63" column="42" severity="error" message="Parameter 
nativeZlibLoaded should be final." 
source="com.puppycrawl.tools.checkstyle.checks.FinalParametersCheck"/>
<error line="63" column="50" severity="error" 
message="&apos;nativeZlibLoaded&apos; hides a field." 
source="com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck"/>
{code}

bq. "Missing a Javadoc comment."
Would you add javadoc for {{loadNativeZlib()}} and 
{{setNativeZlibLoaded(boolean)}}?
I'm thinking It would be better to add "why the tests call these methods?". For 
example,

* loadNativeZlib ... Load native library and set the flag whether to use native 
library. The method is also used for reset the flag modified by 
setNativeZlibLoaded.
* setNativeZlibLoaded ... Set the flag whether to use native library. Used for 
testing non-native libraries.

bq. "'natieZlibLoaded'; hides a field."
{code}
public static void setNativeZlibLoaded(boolean nativeZlibLoaded) {
  ZlibFactory.nativeZlibLoaded = nativeZlibLoaded;
}
{code}
The code sets the flag correctly, so I don't think we must fix the warning.
Hint: Renaming the input variable 'nativeZlibLoaded' to 'isLoaded' or something 
will fix the warning.

bq. "Parameter nativeZlibLoaded should be final."
I'm thinking the parameter should be final.

> Remove io.native.lib.available from trunk
> -----------------------------------------
>
>                 Key: HADOOP-11627
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11627
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Akira AJISAKA
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-11627-002.patch, HADOOP-11627-003.patch, 
> HADOOP-11627-004.patch, HADOOP-11627-005.patch, HADOOP-11627-006.patch, 
> HADOOP-11627-007.patch, HADOOP-11627-008.patch, HADOOP-11627-009.patch, 
> HADOOP-11627.patch
>
>
> According to the discussion in HADOOP-8642, we should remove 
> {{io.native.lib.available}} from trunk, and always use native libraries if 
> they exist.



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

Reply via email to