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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: