Details
-
Type: Improvement
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
Description
JVM attempts to load the sun.misc.Unsafe class to
detect if Sun14ReflectionProvider is the best to use.
The problem is that some JDKs ship with the class
(eg BEA JRockit) but attempting to load it yields a
linkage error rather than a class not found exception.
To be fail-proof it would be better to use system
properties to detect if the VM vendor is Sun.
Attached is patch to use system property java.vm.vendor to detect if
Sun's JDK is used.
Unit tests are separate so that one can be excluded according to which
JVM is being used to run the tests.