[JIRA] Created: (LBCLASSIC-91) Logger.setLevel(null) may throw NPE

Logger.setLevel(null) may throw NPE ----------------------------------- Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] .... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-91?page=com.atlassian.jira.plugin.system... ] mateusz jedruch updated LBCLASSIC-91: ------------------------------------- Attachment: patch
Logger.setLevel(null) may throw NPE -----------------------------------
Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list Attachments: patch
When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] ....
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-91?page=com.atlassian.jira.plugin.system... ] Ceki Gulcu commented on LBCLASSIC-91: ------------------------------------- Hello Mateusz, Could you please provide a test case or at least a full stack trace?
Logger.setLevel(null) may throw NPE -----------------------------------
Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list Attachments: patch
When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] ....
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-91?page=com.atlassian.jira.plugin.system... ] mateusz jedruch commented on LBCLASSIC-91: ------------------------------------------ Patch is attached, it will be also good idea to check the effective level of the 'child' logger, LoggerTest.patch: @Test public void setLevelToNull_B() { loggerTest.setLevel(Level.DEBUG); + Logger child = lc.getLogger(loggerTest.getName() + ".child"); loggerTest.setLevel(null); assertEquals(root.getEffectiveLevel(), loggerTest.getEffectiveLevel()); + assertEquals(root.getEffectiveLevel(), child.getEffectiveLevel()); }
Logger.setLevel(null) may throw NPE -----------------------------------
Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list Attachments: patch
When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] ....
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-91?page=com.atlassian.jira.plugin.system... ] Ceki Gulcu commented on LBCLASSIC-91: ------------------------------------- Thank you for the attached patch. I had not seen it previously. As this bug is very severe, 0.9.13 will be released shortly.
Logger.setLevel(null) may throw NPE -----------------------------------
Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list Attachments: patch
When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] ....
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-91?page=com.atlassian.jira.plugin.system... ] Ceki Gulcu resolved LBCLASSIC-91. --------------------------------- Fix Version/s: 0.9.13 Resolution: Fixed
Logger.setLevel(null) may throw NPE -----------------------------------
Key: LBCLASSIC-91 URL: http://jira.qos.ch/browse/LBCLASSIC-91 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.12 Reporter: mateusz jedruch Assignee: Logback dev list Fix For: 0.9.13
Attachments: patch
When setting null for logger which has childes with null levels then NPE is thrown: Caused by: java.lang.NullPointerException at ch.qos.logback.classic.Logger.handleParentLevelChange(Logger.java:216) [classes/:na] at ch.qos.logback.classic.Logger.setLevel(Logger.java:200) [classes/:na] ....
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
mateusz jedruch (JIRA)