Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-294

In the JBossLoggerFinder the logger type name should be compared instead of using an instance check

XMLWordPrintable

    In the JBossLoggerFinder there is a check for the logger type:

    final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(name);
    if (!(logger instanceof org.jboss.logmanager.Logger)) {
        if (LOGGED.compareAndSet(false, true)) {
            logger.log(Level.ERROR, "The LogManager accessed before the \"java.util.logging.manager\" system property was set to \"org.jboss.logmanager.LogManager\". Results may be unexpected.");
        }
    }
    

    If the log manager is loaded on two class loaders this might throw a false positive. We should compare the class names instead of the instance itself.

          jperkins-rhn James Perkins
          jperkins-rhn James Perkins
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: