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

LOGGING APIs: Misprints in spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta3
    • generic
    • generic
    • Verified



      Name: elR10090 Date: 09/10/2001



      The spec for new Logging API classes with changes according to RFE's

          4487060 logging: inferring caller information should be done lazily
          4487045 logging: improved error handling
          4487041 logging: more fully support hierarchical naming
          
      has misprints.

      1. Specification for the method Handler.reportError(String, Exception, int)
         says
         
             protected void reportError(java.lang.String msg,
                                        java.lang.Exception ex,
                                        int code)
             Protected convenience method to report an error to this Handler's
             ErrorHandler. Note that this method retrieves and uses the ErrorHandler
             ^^^^^^^^^^^^ ^^^^^^^^^^^^
             without doing a security check. It can therefore be used in environments
             where the caller may be non-privileged.

         I believe this is a misprint and ErrorHandler should be replaced with
         ErrorManager in the spec for this method.
          
      2. The spec for two methods LogManager.readConfiguration() and
         LogManager.readConfiguration(InputStream) refers to
         LogManager.setLevel(Level). setLevel method has gone according to the RFE
         4487041.
         
             public void readConfiguration() throws java.io.IOException,
                                                    java.lang.SecurityException
             Reinitialize the logging properties and reread the logging configuration.
             
             The same rules are used for locating the configuration properties as are
             used at startup. So normally the logging properties will be re-read from
             the same file that was used at startup.
             
             Any log level definitions in the new configuration file will be applied
             using LogManager.setLevel() in the order they are read.
             
             A PropertyChangeEvent will be fired after the properties are read.
             
      3. The spec for the method Formatter.format(LogRecord)

             public abstract java.lang.String format(LogRecord record)
             
             Format the given log record and return the formatted string.
             
             The resulting formatted String will normally include a localized and
             formated version of the LogRecord's message field. The
             LogRecord.formatMessage convenience method can (optionally) be used to
             localize and format the message field.
             
         refers to undocumented LogRecord.formatMessage method. I guess this is a
         typo and "LogRecord.formatMessage" should be read as
         "Formatter.formatMessage".
         
         Note that this typo also exists in specification from the last Merlin-b78.

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

      Name: elR10090 Date: 09/13/2001



      Alexey Gibadullin, ###@###.###

      4. Specification for the class LoggingPermission refers to undocumented
         LogManager.setLevel(Level) method:
         
             public final class LoggingPermission
             extends java.security.BasicPermission
             
             The permission which the SecurityManager will check when code that
             is running with a SecurityManager calls one of the logging control
             methods (such as LogManager.setLevel).
                              ^^^^^^^^^^^^^^^^^^^


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

            ghamiltosunw Graham Hamilton (Inactive)
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: