Jörg Schaible commented on Improvement XSTR-723

It seems my enthusiasm was a bit early. As it turns out, GNU Classpath's Unsafe does not have an allocateInstance method

Your patch will not work either, because it looks for the value of system property java.runtime.name, but it is not specified and the value is therefore null.

For icedtea-6 I get following interesting values:

java.specification.version: 1.6
java.specification.vendor: Sun Microsystems Inc.
java.specification.name: Java Platform API Specification
java.vm.vendor: Sun Microsystems Inc.
java.vendor: Sun Microsystems Inc.
java.vm.name: OpenJDK 64-Bit Server VM

while JamVM on Gentoo reports:

java.specification.version: 1.5
java.specification.vendor: Sun Microsystems, Inc.
java.specification.name: Java Platform API Specification
java.vm.vendor: Robert Lougher
java.vendor: GNU Classpath
java.vm.name: JamVM

It is really nonsense to check for the vendor name just to determine the support of Sun14ReflectionProvider ... especially when I look at this method in JVM:

    private boolean canUseSun14ReflectionProvider() {
        return (isSun()
            || isOracle()
            || isApple()
            || isHPUX()
            || isIBM()
            || isBlackdown()
            || isBEAWithUnsafeSupport()
            || isHitachi()
            || isSAP() 
            || isDiablo())
            && is14()
            && loadClass("sun.misc.Unsafe") != null;
    }

Room for improvement ...

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

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to