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

Support UserDefinedFileAttributeView/extended attributes on OS X / HFS+

    XMLWordPrintable

Details

    • x86
    • os_x

    Description

      A DESCRIPTION OF THE REQUEST :
      Java doesn't support UserDefinedFileAttributeView.class on Mac OS X. Thus Files.getFileAttributeView(VALID_PATH, UserDefinedFileAttributeView.class) always return null. See OpenJDK issue:

      https://bugs.openjdk.java.net/browse/JDK-8030048

      JUSTIFICATION :
      Parity with Linux and Windows


      ---------- BEGIN SOURCE ----------
      import java.io.IOException;
      import java.nio.file.Files;
      import java.nio.file.Paths;
      import java.nio.file.attribute.UserDefinedFileAttributeView;

      public class ExtFileAttributeChecker {
          public static void main(String[] args) throws IOException {
              System.out.println(Files.getFileStore(Paths.get( " ./ " )).supportsFileAttributeView(UserDefinedFileAttributeView.class));
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      https://github.com/IsNull/xattrj

      Attachments

        Issue Links

          Activity

            People

              psonal Pallavi Sonal (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: