[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error in FileInputStream?
From: |
reali |
Subject: |
Error in FileInputStream? |
Date: |
Wed, 17 Oct 2001 11:12:04 +0200 (MET DST) |
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, address@hidden
http://www.inf.ethz.ch/personal/reali/
http://www.oberon.ethz.ch/native/
- Error in FileInputStream?,
reali <=