[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:

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
//        {
          throw new SecurityException("ffo");
//        }
//      catch (AccessControlException e)
//        {
//          throw new SecurityException(e.getMessage());
//        }

  native_fd = fd.getNativeFD();

When the JVM boots, 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 Reali, address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]