Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6972833

(fs) WatchService delays the deletion of watch directories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2008, windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b99)
      Java HotSpot(TM) 64-Bit Server VM (build 19.0-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.0.6001]

      A DESCRIPTION OF THE PROBLEM :
      Directories are locked for "Rename" and "Move" operations by the watcher service.

      If a directory is being watched, parent directories cannot be renamed.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Register a directory to be watched, for example : "D:/temp/a/b/c"

      Then try to rename "D:/temp/a/" to "D:/temp/a123/"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "D:/temp/a/" is renamed to "D:/temp/a123/"
      ACTUAL -
      Operation Fails.
      windows reports :Insufficient Permisions for operation.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      windows reports :Insufficient Permisions for operation.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public static void main(String[] args) throws IOException {

              Path dir = Paths.get("D:/temp/a/b/c");
              WatchService w =FileSystems.getDefault().newWatchService();
              dir.register(w, ENTRY_CREATE,ENTRY_DELETE, ENTRY_MODIFY);
              for(;;){}
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: