diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2010-12-25 19:51:22 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2010-12-25 19:51:22 +0000 |
commit | 75fa6e7bf636b038835dbb63c133c7e1b79cd048 (patch) | |
tree | 474e1c9908d8ea325883745fc2afc8361282d2dc | |
parent | fece38543cd6be7efd42bcde0b471a794c071e7a (diff) | |
download | classpath-75fa6e7bf636b038835dbb63c133c7e1b79cd048.tar.gz |
PR classpath/42390: Add and document missing security check in java.io.File#isHidden().
2010-12-25 Andrew John Hughes <ahughes@redhat.com>
PR classpath/42390
* java/io/File.java:
(isHidden()): Add and document missing
security check.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | java/io/File.java | 4 |
2 files changed, 10 insertions, 1 deletions
@@ -1,6 +1,13 @@ 2010-12-25 Andrew John Hughes <ahughes@redhat.com> PR classpath/42390 + * java/io/File.java: + (isHidden()): Add and document missing + security check. + +2010-12-25 Andrew John Hughes <ahughes@redhat.com> + + PR classpath/42390 * java/util/logging/LogManager.java: (addPropertyChangeListener(PropertyChangeListener)): Document fully. Throw NPE in a clearer way. Add diff --git a/java/io/File.java b/java/io/File.java index 4f670e147..080b52feb 100644 --- a/java/io/File.java +++ b/java/io/File.java @@ -700,11 +700,13 @@ public class File implements Serializable, Comparable<File> * * @return <code>true</code> if the file is hidden, <code>false</code> * otherwise. - * + * @throws SecurityException if a security manager exists and denies + * read access to this file. * @since 1.2 */ public boolean isHidden() { + checkRead(); return VMFile.isHidden(path); } |