Skip to content

Commit 4cd87f1

Browse files
author
Andrey Turbanov
committed
8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
Reviewed-by: alanb, lancea
1 parent 7d3400b commit 4cd87f1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/java.base/share/classes/jdk/internal/jrtfs/JrtPath.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -649,11 +649,7 @@ final void deleteIfExists() throws IOException {
649649
}
650650

651651
final JrtFileAttributes getAttributes(LinkOption... options) throws IOException {
652-
JrtFileAttributes zfas = jrtfs.getFileAttributes(this, options);
653-
if (zfas == null) {
654-
throw new NoSuchFileException(toString());
655-
}
656-
return zfas;
652+
return jrtfs.getFileAttributes(this, options);
657653
}
658654

659655
final void setAttribute(String attribute, Object value, LinkOption... options)

0 commit comments

Comments
 (0)