ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE
Alan Bateman
Alan.Bateman at oracle.com
Tue Jan 10 10:23:52 UTC 2023
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