[infinispan-issues] [JBoss JIRA] (ISPN-2237) ConcurrentMapFactory does not allow use of V8 maps with Sun JDK 6

Tristan Tarrant (JIRA) jira-events at lists.jboss.org
Tue Sep 4 00:52:32 EDT 2012


     [ https://issues.jboss.org/browse/ISPN-2237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tristan Tarrant updated ISPN-2237:
----------------------------------

        Status: Resolved  (was: Pull Request Sent)
    Resolution: Done

    
> ConcurrentMapFactory does not allow use of V8 maps with Sun JDK 6
> -----------------------------------------------------------------
>
>                 Key: ISPN-2237
>                 URL: https://issues.jboss.org/browse/ISPN-2237
>             Project: Infinispan
>          Issue Type: Bug
>    Affects Versions: 5.1.6.FINAL
>            Reporter: Robert Stupp
>            Assignee: Galder Zamarreño
>             Fix For: 5.2.0.Alpha4, 5.2.0.Final
>
>
> The implementation in ConcurrentMapFactory checks for existance of a Sun JVM private class. But although a Sun JDK/JRE 6 is used, the check fails (wrong class com.sun.unsafe.Unsafe instead of sun.misc.Unsafe).
> Sould use sun.misc.Unsafe
> {noformat}
>    static {
>       boolean sunIncompatibleJvm;
>       boolean jdk8;
>       boolean allowExperimentalMap = Boolean.getBoolean("infinispan.unsafe.allow_jdk8_chm");
>       try {
>          Class.forName("com.sun.unsafe.Unsafe");
>          sunIncompatibleJvm = false;
>       } catch (ClassNotFoundException e) {
>          sunIncompatibleJvm = true;
>       }
>       
>       try {
>          Class.forName("java.util.concurrent.atomic.LongAdder");
>          jdk8 = true;
>       } catch (ClassNotFoundException e) {
>          jdk8 = false;
>       }
>       if (jdk8 || sunIncompatibleJvm || !allowExperimentalMap)
>          MAP_CREATOR = new JdkConcurrentMapCreator();
>       else
>          MAP_CREATOR = new BackportedV8ConcurrentMapCreator();
>    }
> {noformat}

--
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



More information about the infinispan-issues mailing list