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 "Steve Loughran (JIRA)" <ji...@apache.org> on 2019/04/03 11:05:00 UTC
[jira] [Commented] (HADOOP-16230) Correct findbug ignores for
unjustified issues during update to guava to 27.0-jre in hadoop-project
[ https://issues.apache.org/jira/browse/HADOOP-16230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808609#comment-16808609 ]
Steve Loughran commented on HADOOP-16230:
-----------------------------------------
where we with this? You've closed the first PR? I assume another one is coming, yes?
> 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-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org