hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabor Bota (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-16218) findbugs warning of null param to non-nullable method in Configuration with Guava update
Date Wed, 03 Apr 2019 08:22:02 GMT

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

Gabor Bota commented on HADOOP-16218:
-------------------------------------

This fix causes the following error after added:
{noformat}
NP	propertyName must be non-null but is marked as nullable

Bug type NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE
In class org.apache.hadoop.conf.Configuration
In method org.apache.hadoop.conf.Configuration.asXmlDocument(String)
Parameter propertyName
At Configuration.java:[lines 3543-3572]
{noformat}
[source|https://builds.apache.org/job/PreCommit-HADOOP-Build/16105/artifact/out/new-findbugs-hadoop-common-project_hadoop-common.html#NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE]

I will handle this in HADOOP-16210.

> findbugs warning of null param to non-nullable method in Configuration with Guava update
> ----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-16218
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16218
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 3.3.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>             Fix For: 3.3.0
>
>
> Findbugs is fussing over some unchanged code in configuration
> {code}
> Null passed for non-null parameter of writeXml(String, Writer) in org.apache.hadoop.conf.Configuration.writeXml(Writer)
> Bug type NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS (click for details) 
> In class org.apache.hadoop.conf.Configuration
> In method org.apache.hadoop.conf.Configuration.writeXml(Writer)
> Called method org.apache.hadoop.conf.Configuration.writeXml(String, Writer)
> At Configuration.java:[line 3490]
> Argument 1 is definitely null but must not be null
> Definite null passed to dangerous method call target org.apache.hadoop.conf.Configuration.writeXml(String,
Writer)
> {code}
> Code looks fine; it's invoking Guava.Strings for the check for string == empty-or-null;
maybe something changed there.
> Proposed: add @Nullable in Configuration writeXml



--
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


Mime
View raw message