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

Inconsistent API documentation for @param caller in System.LoggerFinder.getLogger

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs

      The javadoc says:

              /**
               * Returns an instance of {@link Logger Logger}
               * for the given {@code caller}.
               *
               * @param name the name of the logger.
               * @param caller the class for which the logger is being requested;
               * can be {@code null}.
               *
               * @return a {@link Logger logger} suitable for the given caller's
               * use.
               * @throws NullPointerException if {@code name} is {@code null} or
               * {@code caller} is {@code null}.
               * @throws SecurityException if a security manager is present and its
               * {@code checkPermission} method doesn't allow the
               * {@code RuntimePermission("loggerFinder")}.
               */
              public abstract Logger getLogger(String name, /* Module */ Class<?> caller);

      @throws NullPointerException is correct; 'can be null' must be removed from @param caller.

            dfuchs Daniel Fuchs
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: