directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xu Yaning (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DIRKRB-353) Fix findbugs Problem for lib module
Date Mon, 13 Jul 2015 03:35:04 GMT

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

Xu Yaning updated DIRKRB-353:
-----------------------------
    Description: 
For lib module, findbugs reports 6 problems to fix: 

#* Found reliance on default encoding in org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl,
Resource)*: new java.io.InputStreamReader(InputStream);
# *org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl, Resource)* may fail to close
stream;
# *org.apache.kerby.config.MapConfigLoader.loadConfig(ConfigImpl, Resource)* makes inefficient
use of keySet iterator instead of entrySet iterator;
# *instanceof will always return true for all non-null values in org.apache.kerby.config.PropertiesConfigLoader.loadConfig(ConfigImpl,
Properties)*, since all String are instances of String;
# *new org.apache.kerby.config.Resource(String, File, Resource$Format)* may fail to clean
up java.io.InputStream;
# Redundant nullcheck of name, which is known to be non-null in *org.apache.kerby.config.XmlConfigLoader.loadConfig(ConfigImpl,
Element)*;
# Boxing/unboxing to parse a primitive *org.apache.kerby.KOptions.getIntegerOption(KOption)*;
# *org.apache.kerby.KOptions.getBooleanOption(KOption)* has Boolean return type and returns
explicit null;
# Switch statement found in *org.apache.kerby.util.Base64.decode(byte[], int, int)* where
default case is missing;
# Switch statement found in *org.apache.kerby.util.Base64.encode(byte[], int, int)* where
default case is missing.

  was:
For lib module, findbugs reports 6 problems to fix: 

1. Found reliance on default encoding in org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl,
Resource): new java.io.InputStreamReader(InputStream);
2. org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl, Resource) may fail to close
stream;
3. org.apache.kerby.config.MapConfigLoader.loadConfig(ConfigImpl, Resource) makes inefficient
use of keySet iterator instead of entrySet iterator;
4. instanceof will always return true for all non-null values in org.apache.kerby.config.PropertiesConfigLoader.loadConfig(ConfigImpl,
Properties), since all String are instances of String;
5. new org.apache.kerby.config.Resource(String, File, Resource$Format) may fail to clean up
java.io.InputStream;
6. Redundant nullcheck of name, which is known to be non-null in org.apache.kerby.config.XmlConfigLoader.loadConfig(ConfigImpl,
Element).


> Fix findbugs Problem for lib module
> -----------------------------------
>
>                 Key: DIRKRB-353
>                 URL: https://issues.apache.org/jira/browse/DIRKRB-353
>             Project: Directory Kerberos
>          Issue Type: Sub-task
>            Reporter: Xu Yaning
>
> For lib module, findbugs reports 6 problems to fix: 
> #* Found reliance on default encoding in org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl,
Resource)*: new java.io.InputStreamReader(InputStream);
> # *org.apache.kerby.config.IniConfigLoader.loadConfig(ConfigImpl, Resource)* may fail
to close stream;
> # *org.apache.kerby.config.MapConfigLoader.loadConfig(ConfigImpl, Resource)* makes inefficient
use of keySet iterator instead of entrySet iterator;
> # *instanceof will always return true for all non-null values in org.apache.kerby.config.PropertiesConfigLoader.loadConfig(ConfigImpl,
Properties)*, since all String are instances of String;
> # *new org.apache.kerby.config.Resource(String, File, Resource$Format)* may fail to clean
up java.io.InputStream;
> # Redundant nullcheck of name, which is known to be non-null in *org.apache.kerby.config.XmlConfigLoader.loadConfig(ConfigImpl,
Element)*;
> # Boxing/unboxing to parse a primitive *org.apache.kerby.KOptions.getIntegerOption(KOption)*;
> # *org.apache.kerby.KOptions.getBooleanOption(KOption)* has Boolean return type and returns
explicit null;
> # Switch statement found in *org.apache.kerby.util.Base64.decode(byte[], int, int)* where
default case is missing;
> # Switch statement found in *org.apache.kerby.util.Base64.encode(byte[], int, int)* where
default case is missing.



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

Mime
View raw message