ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

Andrey Turbanov turbanoff at gmail.com
Tue Jan 10 12:27:23 UTC 2023


Filled https://bugs.openjdk.org/browse/JDK-8299864

Andrey Turbanov

вт, 10 янв. 2023 г. в 13:24, Alan Bateman <Alan.Bateman at oracle.com>:
>
>
>
> On 10/01/2023 09:35, Andrey Turbanov wrote:
> > Hello.
> > I've noticed that ZipFileStore#supportsFileAttributeView(String)
> > doesn't throw NullPointerException when 'null' is passed as an
> > argument.
> >
> > public boolean supportsFileAttributeView(String name) {
> >      return "basic".equals(name) || "zip".equals(name) ||
> >             (("owner".equals(name) || "posix".equals(name)) && zfs.supportPosix);
> > }
> >
> > Method body was changed to not throw NPE in JDK-8213031.
> > I wonder if it was an intentional change or not?
> The review of that feature went through many iterations over 8 months
> and this was missed, so maybe a short coming in the zipfs tests. Can you
> create a bug for this?
>
> -Alan.


More information about the core-libs-dev mailing list