Details
Description
Hi,
There is a VM from SAP, which is not
The XStream Library includes code that checks the Vendor name of the VM
und depending on that, different reflection providers are used.
In class com.thoughtworks.xstream.core.JVM (example for sun):
private static boolean isSun() {
return System.getProperty("java.vm.vendor").indexOf("Sun") != -1;
}
or comparable demands in the same class for VMs of IBM, HP and others.
private boolean canUseSun14ReflectionProvider() {
return (isSun() || isApple() || isHPUX() || isIBM() || isBlackdown() || isBEAWithUnsafeSupport() || isHitachi()) && is14() && loadClass "sun.misc.Unsafe") != null;
}
The SAP JVM will not be identified from this check and as a result, a the PureJavaReflectionProvider is used, which does not support all features.
adding a check for "SAP AG" results in the Sun14ReflectionProvider being used without problems, so imho this can be easily and safely added.
For your information, here what the System-Properties return:
VM-Version: 5.1.0717
VM-Vendor: SAP AG
Issue Links
- is duplicated by
-
XSTR-438 Please add SAP JVM as a recognized VM
Hi Rico,
is there any chance to get a copy of this JVM? It seems currently not available as download, at least not here: https://www.sdn.sap.com/irj/sdn/downloads?rid=/library/uuid/da699d27-0b01-0010-99b0-f11458f31ef2. Since we do some highly unportable stuff in enhanced mode, we'd like to make our tests. E.g. for JRockit support BEA itself provided patches.