Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7961

SimpleFSLockFactory should catch+box IOException (not FileAlreadyExistsException | AccessDeniedException)

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      SimpleFSLockFactory will only convert FileAlreadyExistsException | AccessDeniedException from Files.createFile() into LockObtainFailedException. Neither of these are guaranteed from the API, only IOException.

      I think SimpleFSLockFactory should box any IOException from Files.createFile() into a LockObtainFailedException instead of just these two optional ones. It is simpler and more consistent behavior, even if its just theoretical problem for some FileSystem impl that doesn't throw these.

      Attachments

        1. LUCENE-7961.patch
          1 kB
          Robert Muir
        2. LUCENE-7961.patch
          1 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: