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

ZipPath getFileAttributeView doesn't comply with spec

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      ZipPath.java:716 (as of 9d305b9c0625d73c752724569dbb7f6c8e80931c) throws UnsupportedOperationException if getFileAttributeView is called on a ZipPath for an unrecognized or disabled attribute view. However the JavaDocs say File.getFileAttributeView should return null when a view is unsupported.

      This means you can't check for a ZipFS that has POSIX attributes enabled by simply querying the view without also being prepared to catch this exception, which is unexpected.


      CUSTOMER SUBMITTED WORKAROUND :
      Catch the exception and convert it to null.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tongwan Andrew Wang
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: