Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5952

File.mkdir() may fail and cause crash.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Flags:
      Patch

      Description

      Locations:

      (1) modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java:409

      (2) modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java:50

      The File.mkdir() method will fail if the parent directory does not exist. In this case, since we cannot ensure the existence of parent directory and we still need to create the directory, the File.mkdirs() should be preferred, which is safe and without any lost. 

        Attachments

        1. 1.patch
          2 kB
          bd2019us

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bd2019us bd2019us
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: