One of the FileInputStream constructors is
implemented as follows:
public
FileInputStream(FileDescriptor fd) throws SecurityException
{
// Hmmm, no other exception but this one to throw, but if the descriptor
// isn't valid, we surely don't have "permission" to read from it.
if (!fd.valid())
throw new SecurityException("Invalid FileDescriptor");
SecurityManager sm = System.getSecurityManager();
if (sm != null)
{
// try
// {
//sm.checkRead(fd);
throw new SecurityException("ffo");
// }
// catch (AccessControlException e)
// {
// throw new SecurityException(e.getMessage());
// }
}
native_fd = fd.getNativeFD();
}
When the JVM boots, System.in is allocated using a file descriptor.
If the security manager is already installed, then an exception
is thrown.
Is there a reason, for assuming that the security manager is not
available at this point or is this only some forgotten code that,
by chance, nobody else but me run into?
-Patrik
--
Patrik Reali, [EMAIL PROTECTED]
http://www.inf.ethz.ch/personal/reali/
http://www.oberon.ethz.ch/native/
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath