You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Eric Citaire (JIRA)" <ji...@apache.org> on 2010/12/21 17:46:01 UTC
[jira] Created: (CXF-3211) Infinite loop in
FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not
writable
Infinite loop in FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not writable
----------------------------------------------------------------------------------------------
Key: CXF-3211
URL: https://issues.apache.org/jira/browse/CXF-3211
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.2.6
Reporter: Eric Citaire
FileUtils.getDefaultTempDir() can go into a infinite loop when the "java.io.tmpdir" system property is set to an non-writable directory.
See issue #CXF-1924.
May be something like this would prevent an infinite loop :
{{s = System.getProperty("java.io.tmpdir");}}
{{File checkExists = new File(s);}}
{{if (!checkExists.exists() || !checkExists.isDirectory() || !checkExists.canWrite()) {}}
{{throw new RuntimeException("The directory "}}
{{+ checkExists.getAbsolutePath()}}
{{+ " is not a writable directory");}}
{{}}}
{{File f = new File(s, "cxf-tmp-" + x);}}
{{for (int attempts=0; attempts<10; attempts++) {}}
{{x = (int)(Math.random() * 1000000);}}
{{f = new File(s, "cxf-tmp-" + x);}}
{{if (f.mkdir()) break;}}
{{}}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-3211) Infinite loop in
FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not
writable
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CXF-3211.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.4
2.2.13
2.3.2
> Infinite loop in FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not writable
> ----------------------------------------------------------------------------------------------
>
> Key: CXF-3211
> URL: https://issues.apache.org/jira/browse/CXF-3211
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.6
> Reporter: Eric Citaire
> Assignee: Willem Jiang
> Fix For: 2.3.2, 2.2.13, 2.4
>
>
> FileUtils.getDefaultTempDir() can go into a infinite loop when the "java.io.tmpdir" system property is set to an non-writable directory.
> See issue #CXF-1924.
> May be something like this would prevent an infinite loop :
> {{s = System.getProperty("java.io.tmpdir");}}
> {{File checkExists = new File(s);}}
> {{if (!checkExists.exists() || !checkExists.isDirectory() || !checkExists.canWrite()) {}}
> {{throw new RuntimeException("The directory "}}
> {{+ checkExists.getAbsolutePath()}}
> {{+ " is not a writable directory");}}
> {{}}}
> {{File f = new File(s, "cxf-tmp-" + x);}}
> {{for (int attempts=0; attempts<10; attempts++) {}}
> {{x = (int)(Math.random() * 1000000);}}
> {{f = new File(s, "cxf-tmp-" + x);}}
> {{if (f.mkdir()) break;}}
> {{}}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-3211) Infinite loop in
FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not
writable
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CXF-3211:
---------------------------------
Assignee: Willem Jiang
> Infinite loop in FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not writable
> ----------------------------------------------------------------------------------------------
>
> Key: CXF-3211
> URL: https://issues.apache.org/jira/browse/CXF-3211
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.6
> Reporter: Eric Citaire
> Assignee: Willem Jiang
>
> FileUtils.getDefaultTempDir() can go into a infinite loop when the "java.io.tmpdir" system property is set to an non-writable directory.
> See issue #CXF-1924.
> May be something like this would prevent an infinite loop :
> {{s = System.getProperty("java.io.tmpdir");}}
> {{File checkExists = new File(s);}}
> {{if (!checkExists.exists() || !checkExists.isDirectory() || !checkExists.canWrite()) {}}
> {{throw new RuntimeException("The directory "}}
> {{+ checkExists.getAbsolutePath()}}
> {{+ " is not a writable directory");}}
> {{}}}
> {{File f = new File(s, "cxf-tmp-" + x);}}
> {{for (int attempts=0; attempts<10; attempts++) {}}
> {{x = (int)(Math.random() * 1000000);}}
> {{f = new File(s, "cxf-tmp-" + x);}}
> {{if (f.mkdir()) break;}}
> {{}}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3211) Infinite loop in
FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not
writable
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974106#action_12974106 ]
Willem Jiang commented on CXF-3211:
-----------------------------------
Dan Kulp committed a fix into the trunk weeks ago, I just merge it back to the CXF 2.3.x and 2.2.x branch.
> Infinite loop in FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory is not writable
> ----------------------------------------------------------------------------------------------
>
> Key: CXF-3211
> URL: https://issues.apache.org/jira/browse/CXF-3211
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.2.6
> Reporter: Eric Citaire
> Assignee: Willem Jiang
> Fix For: 2.3.2, 2.2.13, 2.4
>
>
> FileUtils.getDefaultTempDir() can go into a infinite loop when the "java.io.tmpdir" system property is set to an non-writable directory.
> See issue #CXF-1924.
> May be something like this would prevent an infinite loop :
> {{s = System.getProperty("java.io.tmpdir");}}
> {{File checkExists = new File(s);}}
> {{if (!checkExists.exists() || !checkExists.isDirectory() || !checkExists.canWrite()) {}}
> {{throw new RuntimeException("The directory "}}
> {{+ checkExists.getAbsolutePath()}}
> {{+ " is not a writable directory");}}
> {{}}}
> {{File f = new File(s, "cxf-tmp-" + x);}}
> {{for (int attempts=0; attempts<10; attempts++) {}}
> {{x = (int)(Math.random() * 1000000);}}
> {{f = new File(s, "cxf-tmp-" + x);}}
> {{if (f.mkdir()) break;}}
> {{}}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.