[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3952) LogLevel default should be LogLevel.error but it is null
Francisco Jose Peredo Noguez (JIRA)
jira-events at lists.jboss.org
Thu Feb 12 14:37:44 EST 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12452456#action_12452456 ]
Francisco Jose Peredo Noguez commented on JBSEAM-3952:
------------------------------------------------------
I suggest changing this to:
LogLevel logLevel; //<--- NO NEED TO INITIALIZE
try{
logLevel = exception.attributeValue("log-level") != null ?
LogLevel.valueOf(exception.attributeValue("log-level").toLowerCase()) : LogLevel.error; //<--- INITIALIZE TO ERROR LEVEL
> LogLevel default should be LogLevel.error but it is null
> --------------------------------------------------------
>
> Key: JBSEAM-3952
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3952
> Project: Seam
> Issue Type: Bug
> Affects Versions: 2.1.0.SP1, 2.1.1.CR1, 2.1.1.CR2, 2.1.1.GA
> Reporter: Francisco Jose Peredo Noguez
>
> In org.jboss.seam.exception.Exceptions in the parse method:
> LogLevel logLevel = LogLevel.error; <--- THIS LINE IS IRRELEVANT
> try
> {
> logLevel = exception.attributeValue("log-level") != null ? //<--- THIS LINE SETS THE DEFAULT TO NULL
> LogLevel.valueOf(exception.attributeValue("log-level").toLowerCase()) : null; //<--- THIS LINE TOO
>
> // The logLevel attribute is deprecated! Use log-level instead
> if (logLevel == null && exception.attributeValue("logLevel") != null)
> {
> logLevel = LogLevel.valueOf(exception.attributeValue("logLevel").toLowerCase());
> }
> The line (168,169) sets the logLevel to null if it does not find the attribute in the .xml attribute, making the line 165 irrelevant, the actual default becomes "null"
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list