[
https://issues.apache.org/jira/browse/DIRKRB-353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiajia Li resolved DIRKRB-353.
------------------------------
Resolution: Fixed
> 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
> Attachments: DIRKRB-353-v1.patch, DIRKRB-353-v2.patch
>
>
> For lib module, findbugs reports 10 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)