[
https://issues.apache.org/jira/browse/HADOOP-16220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16806379#comment-16806379
]
Hudson commented on HADOOP-16220:
---------------------------------
FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #16311 (See
[https://builds.apache.org/job/Hadoop-trunk-Commit/16311/])
HADOOP-16220. Add findbugs ignores for unjustified issues during update
(aajisaka: rev 53a86e2b8ecb83b666d4ed223fc270e1a46642c1)
* (edit) hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
> Add findbugs ignores for unjustified issues during update to guava to
> 27.0-jre in hadoop-project
> ------------------------------------------------------------------------------------------------
>
> Key: HADOOP-16220
> URL: https://issues.apache.org/jira/browse/HADOOP-16220
> Project: Hadoop Common
> Issue Type: Sub-task
> Affects Versions: 3.0.4, 3.3.0, 3.2.1, 3.1.3
> Reporter: Gabor Bota
> Assignee: Gabor Bota
> Priority: Major
> Attachments: HADOOP-16210.001.patch.findbugs.log
>
>
> There are some findbugs issues with the guava update that seemed unjustified
> and should be fixed before the update:
> * *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.
> * *Null passed for non-null parameter of
> com.google.common.base.Preconditions.checkArgument(boolean, String, Object)
> in org.apache.hadoop.hdfs.qjournal.server.JournalNode.getLogDir(String,
> String)*
> In org/apache/hadoop/hdfs/qjournal/server/JournalNode.java:325 we call
> {code:java}
> Preconditions.checkArgument(jid != null &&
> !jid.isEmpty(),
> "bad journal identifier: %s", jid);
> {code}
> for this call findbug assumes that {{Argument 3 might be null but must not be
> null}}, but Guava 27.0's
> {{com.google.common.base.Preconditions#checkArgument(boolean,
> java.lang.String, java.lang.Object)}} is annotated like the following:
> {code:java}
> public static void checkArgument(
> boolean b, @Nullable String errorMessageTemplate, @Nullable Object p1) {
> {code}
> so we have {{@Nullable}} on argument 3, and that renders the assumption
> incorrect.
> * *Nullcheck of jid at line 346 of value previously dereferenced in
> org.apache.hadoop.hdfs.qjournal.server.JournalNode.getLogDir(String, String)*
> This is about the {{assert jid != null;}} at JournalNode.java:346. I would
> leave it as is, it's not a redundant check, just additional information. (I'm
> not a fan of using {{assert}} in production code, but if it's there we can
> leave it).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]