bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/26668] java.util.logging bugs


From: mark at klomp dot org
Subject: [Bug classpath/26668] java.util.logging bugs
Date: 16 Mar 2006 13:58:50 -0000


------- Comment #10 from mark at gcc dot gnu dot org  2006-03-16 13:58 -------
Subject: Re:  java.util.logging bugs

On Wed, 2006-03-15 at 14:30 +0000, rafaels at redhat dot com wrote:
> 
> ------- Comment #5 from rafaels at redhat dot com  2006-03-15 14:30 -------
> Regarding #6, I don't actually have a test case for this. It just looked
> suspicous so I changed it just to make sure it wasn't the source of any of my
> problems. I suspect you are correct that in practice this not likely to be an
> issue, but the code looked suspicious to me for two reasons.
> 
> 1. I wasn't sure string literals were automatically interned by all JVMs. If
> this is in fact part of the langauge spec then this is a non issue.

They should. If they do not that is a bug.

> 2. The Level constructor is protected which means that anyone can pass a non
> liternal value into the name slot via subclassing. I don't know if this is
> intended. If not an alternative fix would be to make the Level constructor
> private.

That is true. But for the parse() method only the standard log levels
matter.

We do need a comment explaining that using == is "safe" for the standard
log levels since the argument is interned and the standard log levels
are constructed with a constant (so already interned) name.

BTW. I added a Mauve test for parse to make sure things work even when
parse gets a "non-constant" name.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26668





reply via email to

[Prev in Thread] Current Thread [Next in Thread]