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

Lin Chen commented on DIRKRB-262:
---------------------------------

Thanks Wei for the patch. The patch looks good. A minor problem:
The codes like
{code}
-                    tempCRLFile.delete();
+                    if(!tempCRLFile.delete()) {
+                        throw new CertificateException("CRLFile:" + 
tempCRLFile.getPath() + " can not be deleted" );
+                    }
{code}
and
{code}
-        dir.mkdirs();
-        if (!dir.exists()) {
+        if (!dir.exists() && !dir.mkdirs()) {
             throw new IOException(dir.getCanonicalPath() + " doesn't exist!");
         }
{code}
will make the method of deleting files and making directories be called twice. 
As a result, when {{delete()}} and {{mkdirs}} called secondly, it will always 
return false. 

>  Fix issues in not-yet-commons-ssl module
> -----------------------------------------
>
>                 Key: DIRKRB-262
>                 URL: https://issues.apache.org/jira/browse/DIRKRB-262
>             Project: Directory Kerberos
>          Issue Type: Bug
>            Reporter: Jiajia Li
>            Assignee: Wei Zhou
>         Attachments: DIRKRB-262-V1.patch
>
>
> https://analysis.apache.org/component_issues/index?id=org.apache.kerby%3Akerby-all#resolved=false|moduleUuids=f787c6cd-8378-4c01-aca9-79ba77a765f6



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

Reply via email to