diff --git a/xstream/src/java/com/thoughtworks/xstream/core/JVM.java b/xstream/src/java/com/thoughtworks/xstream/core/JVM.java index cbefa04e9..27ed00f8b 100644 --- a/xstream/src/java/com/thoughtworks/xstream/core/JVM.java +++ b/xstream/src/java/com/thoughtworks/xstream/core/JVM.java @@ -90,7 +90,9 @@ static class Test { canAllocateWithUnsafe = test; test = false; Class type = PureJavaReflectionProvider.class; - if (canUseSunUnsafeReflectionProvider()) { + if (isVersion(23) && canUseSunUnsafeReflectionProvider()) { + type = loadClassForName("com.thoughtworks.xstream.converters.reflection.SunLimitedUnsafeReflectionProvider"); + } else if (canUseSunUnsafeReflectionProvider()) { Class cls = loadClassForName("com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider"); if (cls != null) { try {