summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2010-12-25 19:51:22 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2010-12-25 19:51:22 +0000
commit75fa6e7bf636b038835dbb63c133c7e1b79cd048 (patch)
tree474e1c9908d8ea325883745fc2afc8361282d2dc
parentfece38543cd6be7efd42bcde0b471a794c071e7a (diff)
downloadclasspath-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--ChangeLog7
-rw-r--r--java/io/File.java4
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d9c17694..8d7f07322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}