src/share/classes/java/util/logging/LogManager.java

Print this page

        

*** 1128,1138 **** * It is also important to note that the Logger associated with the * String {@code name} may be garbage collected at any time if there * is no strong reference to the Logger. The caller of this method * must check the return value for null in order to properly handle * the case where the Logger has been garbage collected. ! * <p> * @param name name of the logger * @return matching logger or null if none is found */ public Logger getLogger(String name) { return getUserContext().findLogger(name); --- 1128,1138 ---- * It is also important to note that the Logger associated with the * String {@code name} may be garbage collected at any time if there * is no strong reference to the Logger. The caller of this method * must check the return value for null in order to properly handle * the case where the Logger has been garbage collected. ! * * @param name name of the logger * @return matching logger or null if none is found */ public Logger getLogger(String name) { return getUserContext().findLogger(name);
*** 1149,1159 **** * garbage collected. In particular, if the returned name is passed * to {@code LogManager.getLogger()}, then the caller must check the * return value from {@code LogManager.getLogger()} for null to properly * handle the case where the Logger has been garbage collected in the * time since its name was returned by this method. ! * <p> * @return enumeration of logger name strings */ public Enumeration<String> getLoggerNames() { return getUserContext().getLoggerNames(); } --- 1149,1159 ---- * garbage collected. In particular, if the returned name is passed * to {@code LogManager.getLogger()}, then the caller must check the * return value from {@code LogManager.getLogger()} for null to properly * handle the case where the Logger has been garbage collected in the * time since its name was returned by this method. ! * * @return enumeration of logger name strings */ public Enumeration<String> getLoggerNames() { return getUserContext().getLoggerNames(); }