On Saturday 18 May 2002 03:20 am, Dain Sundstrom wrote:
> Can Logger.getLoger return null under any circumstances?  

Shit I hope not:

   public static Logger getLogger(Class clazz)
   {
      Logger logger = new Logger(clazz.getName());
      return logger;
   }

> Funky stuff
> like this in innerclasses has never worked correctly.  You should make
> this a private top level class.

Except the top level is an interface, which is why it is in the nested utils.  
Perhaps this should move to a toplevel package private... 

--jason


> -dain
>
> Jason Dillon wrote:
> > could be with 1.3 as well, but definetly with 1.4 on linux.  Some code
> > which I checked in a tested yesterday under 1.4 magically stopped working
> > today.  I sometimes get a NPE at log.debug() inside Util.getBoolean():
> >
> > <snip>
> >
> > public interface NestedThrowable
> >    extends Serializable
> > {
> >
> >  // ...
> >
> >    final class Util
> >    {
> >       private static final Logger log =
> > Logger.getLogger(NestedThrowable.class);
> >
> >       /** A helper to get a boolean property. */
> >       protected static boolean getBoolean(String name, boolean
> > defaultValue) {
> >          name = NestedThrowable.class.getName() + "." + name;
> >          String value = System.getProperty(name,
> > String.valueOf(defaultValue));
> >
> >          log.debug(name + "=" + value); // NPE here
> >
> >          return new Boolean(value).booleanValue();
> >       }
> >
> > </snip>
> >
> > If I change log to be non-final and try to init log if it is null, then
> > it works fine.
> >
> > Anyone know what is up with this?
> >
> > --jason
> >
> > _______________________________________________________________
> >
> > Hundreds of nodes, one monster rendering program.
> > Now that's a super model! Visit http://clustering.foundries.sf.net/
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
>
> _______________________________________________________________
> Hundreds of nodes, one monster rendering program.
> Now that's a super model! Visit http://clustering.foundries.sf.net/
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development

_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to