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

Robert Gibson commented on RIVER-416:
-------------------------------------

Great, I suppose it works on older JDK versions as well.

For the record, I still think that a version using only public APIs is 
better/less fragile across JDK suppliers or versions, using the serialisation 
trick only as a fallback if the desired result isn't achieved:
{code}
   private static Level createLevel(String name,
                                     int value,
                                     String resourceBundleName) {

        new CustomLevel(name, value, resourceBundleName);
        final Level level = Level.parse (Integer.toString (value));

        if (level.getClass ().equals (Level.class)) {
            return level;
        } else {
            ...
        }
{code}

But the current commit solves my immediate problem so I'm not complaining!
                
> 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