Commons IO
  1. Commons IO
  2. IO-231

FileUtils generate wrong exception message in isFileNewer method

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 2.0
    • Component/s: Utilities
    • Labels:
      None

      Description

      if (!reference.exists()) {
          throw new IllegalArgumentException("The reference file '" + file + "' doesn't exist");
      }
      

      If second argument file does not exist isFileNewer method generates exception with message about first argument file does not exist.

        Activity

        Hide
        Eugene Smelik added a comment -

        The same problem exists in method isFileOlder()

        Show
        Eugene Smelik added a comment - The same problem exists in method isFileOlder()
        Hide
        Sebb added a comment -

        Thanks for the report. Fixed in SVN:

        URL: http://svn.apache.org/viewvc?rev=919101&view=rev
        Log:
        IO-231 FileUtils generate wrong exception message in isFileNewer method

        Modified:
        commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
        commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java

        Show
        Sebb added a comment - Thanks for the report. Fixed in SVN: URL: http://svn.apache.org/viewvc?rev=919101&view=rev Log: IO-231 FileUtils generate wrong exception message in isFileNewer method Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.05h
              0.05h
              Remaining:
              Remaining Estimate - 0.05h
              0.05h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development