Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4259938

Javadoc for java.util.jar.JarFile.JarFile() does not specify SecurityException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • sparc
    • solaris_2.6



      Name: ksC84122 Date: 08/05/99


      JDK1.3 javadoc for java.util.jar.JarFile.JarFile() states :
      -------

      JarFile

      public JarFile(File file,
                     boolean verify,
                     int mode)
              throws IOException

           Creates a new JarFile to read from the specified File object in the
           specified mode. The mode argument must be either OPEN_READ or
           OPEN_READ | OPEN_DELETE.
           Parameters:
               file - the JAR file to be opened for reading
               verify - whether or not to verify the JarFile if it is signed.
               mode - the mode in which the file is to be opened
           Throws:
               FileNotFoundException - if the file could not be found
               IOException - if an I/O error has occurred
               IllegalArgumentException - If the mode argument is invalid
      -------

      The javadoc says nothing about SecurityException.
      In fact, JarFile() throws a SecurityException if access to the
      file is denied by SecurityManager (this behavior is inherited from ZipFile).

      The javadoc should be fixed.

      ======================================================================

            shommel Scott Hommel (Inactive)
            skosunw Sko Sko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: