[jboss-jira] [JBoss JIRA] (ELY-615) Improvement for usage of file.mkdirs() in FileSystemSecurityRealm.Identity
Tomaz Cerar (JIRA)
issues at jboss.org
Fri Jul 29 07:07:00 EDT 2016
[ https://issues.jboss.org/browse/ELY-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272770#comment-13272770 ]
Tomaz Cerar commented on ELY-615:
---------------------------------
Better than using file.mkdirs() would be to use Files#createDirectories as it properly throws exceptions
> Improvement for usage of file.mkdirs() in FileSystemSecurityRealm.Identity
> --------------------------------------------------------------------------
>
> Key: ELY-615
> URL: https://issues.jboss.org/browse/ELY-615
> Project: WildFly Elytron
> Issue Type: Bug
> Affects Versions: 1.1.0.Beta7
> Reporter: Ondrej Lukas
> Assignee: Darran Lofthouse
> Priority: Minor
> Labels: static_analysis
> Fix For: 1.1.0.Beta8
>
>
> There is method {{tempPath()}} in org.wildfly.security.auth.realm.FileSystemSecurityRealm.Identity which uses {{file.mkdirs()}} without checking its return value. It is bad practice to ignore return value of this method (since false means that file has not been created and it can result to any unexpected and confusing failure later).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list