Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Support Hitachi JVM (XSTR-373)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.codehaus.org/xstream/trunk@1128 9830eeb5-ddf4-0310-9ef7-f4b9a3e3227e
  • Loading branch information
joehni committed Apr 30, 2007
1 parent b59bdd5 commit ea43bb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xstream/src/java/com/thoughtworks/xstream/core/JVM.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ private static boolean isBEAWithUnsafeSupport() {
// If non-BEA, or possibly some very old JRockit version
return false;
}

private static boolean isHitachi() {
return System.getProperty("java.vm.vendor").indexOf("Hitachi") != -1;
}

public Class loadClass(String name) {
try {
Expand Down Expand Up @@ -154,7 +158,7 @@ public synchronized ReflectionProvider bestReflectionProvider() {
}

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

public static boolean reverseFieldDefinition() {
Expand Down

0 comments on commit ea43bb2

Please sign in to comment.