Another one from PR42390: 2010-12-25 Andrew John Hughes <ahug...@redhat.com>
PR classpath/42390 * java/io/File.java: (isHidden()): Add and document missing security check. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: java/io/File.java =================================================================== RCS file: /sources/classpath/classpath/java/io/File.java,v retrieving revision 1.75 diff -u -u -r1.75 File.java --- java/io/File.java 3 Jun 2010 19:12:55 -0000 1.75 +++ java/io/File.java 25 Dec 2010 19:07:38 -0000 @@ -700,11 +700,13 @@ * * @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); }