Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1924

Infinite loop in FileUtils.getDefaultTempDir() when "java.io.tmpdir" directory does not exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4, 2.2
    • 2.0.10, 2.1.4
    • Core
    • None

    Description

      FileUtils.getDefaultTempDir() can go into a infinite loop when the "java.io.tmpdir" system property is set to an non-existent directory. Here's the code that causes the problem:

      s = System.getProperty("java.io.tmpdir");
      File f = new File(s, "cxf-tmp-" + x);
      while (!f.mkdir())

      { x = (int)(Math.random() * 1000000); f = new File(s, "cxf-tmp-" + x); }

      Attachments

        Activity

          People

            seanoc Sean O'Callaghan
            gawor@mcs.anl.gov Jarek Gawor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: