8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes

Reviewed-by: alanb, lancea
This commit is contained in:
Andrey Turbanov 2023-01-11 15:14:41 +00:00
parent 7d3400b1cf
commit 4cd87f1bda

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -649,11 +649,7 @@ final class JrtPath implements Path {
}
final JrtFileAttributes getAttributes(LinkOption... options) throws IOException {
JrtFileAttributes zfas = jrtfs.getFileAttributes(this, options);
if (zfas == null) {
throw new NoSuchFileException(toString());
}
return zfas;
return jrtfs.getFileAttributes(this, options);
}
final void setAttribute(String attribute, Object value, LinkOption... options)