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

(fs) WatchService delays the deletion of watch directories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 7
    • core-libs
    • x86
    • windows_2008, windows_7

      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...

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: