river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brouwer <mark.brou...@marbro.org>
Subject Re: Latest Java release causes runtime exception
Date Sun, 10 Feb 2013 21:04:18 GMT
Hi Dennis,

On 2/5/13 6:39 PM, Dennis Reedy wrote:
> This also happens with updates to Java 1.6 (u39). The fix looks to
> besimple. The Levels class seems to be the issue. Unless I'm missing
> something, it seems straight forward enough the create a custom level
> without using the ClassReplacingObjectOutputStream and the LevelData
> approach. I modified Levels (attached on my reply), rebuilt and
> everything seems to load successfully. Without this fix I have a
> complete show stopper for some of my installations.
> I'd like to request that this gets fixed ASAP and a new release
> produced.

The reason for code is not some sort of code fetish I believe, it allows 
for the creation of a pure instance of java.util.logging.Level that 
allows for deserialization in JVMs that have never seen the 
com.sun.jini.logging.Levels class. It also allows to use of 'HANDLED' 
and 'FAILED' in configuration files for java.util.logging by means of 
the Level.parse() method. The proposed change breaks with all of this 
and therefore it doesn't seem a proper fix to me.

I did some tests with the latest JDK 1.7 and indeed Oracle broke the 
serialized contract for Level, a quick look at the source code indicate 
they introduced a field 'localizedLevelName' without making it 
transient. So Oracle broke the contract and this should be reported as a 
bug against Java SE. Note that in the source code thay also didn't add 
the @serial tag so I really hope this is an oversight on their side. I 
did no further analysis on what else they changed in the Level class or 
the rationale behind it.

Mark Brouwer

View raw message