cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1083) LogUtils is missing some MissingResourceException handling
Date Mon, 01 Oct 2007 11:53:50 GMT

    [ https://issues.apache.org/jira/browse/CXF-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531494
] 

Freeman Fang commented on CXF-1083:
-----------------------------------

Benson, 

you are right, we also need do the same thing when name is not null, something like
try {
    if (name == null) {
          return (Logger) cns.newInstance(loggerName, BundleUtils.getBundleName(cls)); 
    } else {
          return (Logger) cns.newInstance(loggerName, BundleUtils.getBundleName(cls, name));

    }
} catch (InvocationTargetException ite) { 
    if (ite.getTargetException() instanceof MissingResourceException) { 
           return (Logger) cns.newInstance(loggerName, null); 
    } else { 
           throw ite; 
   } 

} 


> LogUtils is missing some MissingResourceException handling
> ----------------------------------------------------------
>
>                 Key: CXF-1083
>                 URL: https://issues.apache.org/jira/browse/CXF-1083
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.2
>            Reporter: benson margulies
>            Assignee: Daniel Kulp
>            Priority: Blocker
>
> In LogUtils.createLogger, there is no handling for MissingResourceException when there
is a custom logger class.
> The Log4jClass, delegating to the Abstract class, gets just the same collection of missing
resource exceptions as the default case. So it blows up.
> The code in createLogger only fails to handle if the name is non-null. If the name is
null, it has a try block. Looks to me as if the == null test is backwards.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message