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

Gabor Bota resolved HADOOP-16230.
---------------------------------
    Resolution: Won't Fix

I'll resolve it as won't fix. I will fix this in HADOOP-16210.

> Correct findbug ignores for unjustified issues during update to guava to 
> 27.0-jre in hadoop-project
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-16230
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16230
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.3.0
>            Reporter: Gabor Bota
>            Assignee: Gabor Bota
>            Priority: Major
>
> In HADOOP-16220 I’ve added
> {code:java}
> <Match>
>        <Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
>        <Method name="persistPaxosData" />
>        <Bug pattern="NP_NULL_PARAM_DEREF" />
>      </Match>
> {code}
> instead of
> {code:java}
>      <Match>
>        <Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
>        <Method name="getPersistedPaxosData" />
>        <Bug pattern="NP_NULL_PARAM_DEREF" />
>      </Match>
> {code}
> So it should be {{getPersistedPaxosData}} instead of {{persistPaxosData}}.
>  
> The following description is correct, but the code was not:
> *Null passed for non-null parameter of 
> com.google.common.base.Preconditions.checkState(boolean, String, Object, 
> Object, Object) in 
> org.apache.hadoop.hdfs.qjournal.server.Journal.getPersistedPaxosData(long)*
> In {{org/apache/hadoop/hdfs/qjournal/server/Journal.java:1064}} we call
> {code:java}
> Preconditions.checkState(ret != null &&
>           ret.getSegmentState().getStartTxId() == segmentTxId,
>           "Bad persisted data for segment %s: %s ; journal id: %s",
>           segmentTxId, ret, journalId);
> {code}
> for this call findbug assumes that {{Argument 4 might be null but must not be 
> null}}, but Guava 27.0's 
> {{com.google.common.base.Preconditions#checkState(boolean, java.lang.String, 
> java.lang.Object, java.lang.Object, java.lang.Object)}} is annotated like the 
> following:
> {code:java}
>   public static void checkState(
>       boolean b,
>       @Nullable String errorMessageTemplate,
>       @Nullable Object p1,
>       @Nullable Object p2,
>       @Nullable Object p3) {
> {code}
> so we have {{@Nullable}} on each parameter for the method. I don't see this 
> warning as justified, or need to be fixed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to