[ 
https://issues.apache.org/jira/browse/RIVER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583534#comment-13583534
 ] 

Dennis Reedy commented on RIVER-416:
------------------------------------

I dont actually like either approach. The issue being discussed here is whether 
a com.sun.jini.logging.Levels.HANDLED or com.sun.jini.logging.Levels.FAILED 
with the patched Levels class could be loaded be an older version of River. If 
someone serialized com.sun.jini.logging.Levels, with the inner 
com.sun.jini.logging.Levels.CustomLevel class, then tried to read it back with 
an older version of River they will get a CNFE. But is this even a reasonable 
use-case? After all, com.sun.jini.logging.Levels is in the platform, in 
jsk-dl.jar (in alot of other places). 

IMO, yes this can happen, but it's an edge case at best. I also dont like the 
hack of using reflection or the older approach of creating the class descriptor 
by swapping output streams. 

If we choose to go with the Level.parse() approach, we only get the level 
integer as the name, not "HANDLED" or "FAILED". Works, but does not meet the 
usability test by administrators. 

I suggest we move forward with the CustomLevel inner class.
                
> The com.sun.jini.logging.Levels class produces a RuntimeException with the 
> latest version of Java
> -------------------------------------------------------------------------------------------------
>
>                 Key: RIVER-416
>                 URL: https://issues.apache.org/jira/browse/RIVER-416
>             Project: River
>          Issue Type: Bug
>          Components: com_sun_jini_logging
>    Affects Versions: River_2.2.0
>            Reporter: Dennis Reedy
>            Priority: Blocker
>         Attachments: Levels.java
>
>
> The com.sun.jini.logging.Levels class produces a RuntimeException with the 
> latest version of Java (both 1.6 and 1.7). The issue surrounds creation of 
> custom java.util.logging.Level. The current implementation uses a 
> ClassReplacingObjectOutputStream and the LevelData approach. By removing this 
> approach and creating a subclass of java.util.logging.Level the issue gets 
> resolved.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to