Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion xstream/src/java/com/thoughtworks/xstream/core/JVM.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ static class Test {
canAllocateWithUnsafe = test;
test = false;
Class type = PureJavaReflectionProvider.class;
if (canUseSunUnsafeReflectionProvider()) {
if (isVersion(23) && canUseSunUnsafeReflectionProvider()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean canUseSunLimitedUnsafeReflectionProvider here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This is capturing the value of

whereas is not available yet. The original code was perhaps confusingly written. All I am changing here is what the PR title says.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes, I see. Thanks for the clarification.

type = loadClassForName("com.thoughtworks.xstream.converters.reflection.SunLimitedUnsafeReflectionProvider");
} else if (canUseSunUnsafeReflectionProvider()) {
Class cls = loadClassForName("com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider");
if (cls != null) {
try {
Expand Down
Loading