Log Message
Merge fix for Android from trunk.
Modified Paths
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/ReflectionConverter.java
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/core/JVM.java
Property Changed
Diff
Property changes: branches/v-1.4.x
Modified: svn:mergeinfo
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/ReflectionConverter.java (2212 => 2213)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/ReflectionConverter.java 2014-01-14 19:01:23 UTC (rev 2212)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/ReflectionConverter.java 2014-01-14 23:07:54 UTC (rev 2213)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2005, 2006 Joe Walnes.
- * Copyright (C) 2006, 2007, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2013, 2014 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -11,12 +11,13 @@
*/
package com.thoughtworks.xstream.converters.reflection;
-import java.beans.EventHandler;
-
+import com.thoughtworks.xstream.core.JVM;
import com.thoughtworks.xstream.mapper.Mapper;
public class ReflectionConverter extends AbstractReflectionConverter {
+ // Might be missing in Android
+ private final static Class eventHandlerType = JVM.loadClassForName("java.beans.EventHandler");
private Class type;
public ReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider) {
@@ -37,7 +38,7 @@
}
public boolean canConvert(Class type) {
- return ((this.type != null && this.type == type) || (this.type == null && type != null && type != EventHandler.class))
+ return ((this.type != null && this.type == type) || (this.type == null && type != null && type != eventHandlerType))
&& canAccess(type);
}
}
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/core/JVM.java (2212 => 2213)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/core/JVM.java 2014-01-14 19:01:23 UTC (rev 2212)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/core/JVM.java 2014-01-14 23:07:54 UTC (rev 2213)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.security.AccessControlException;
import java.text.AttributedString;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -504,6 +503,7 @@
System.out.println("Supports AWT: " + isAWTAvailable());
System.out.println("Supports Swing: " + isSwingAvailable());
System.out.println("Supports SQL: " + isSQLAvailable());
+ System.out.println("Java Beans EventHandler present: " + (loadClassForName("java.beans.EventHandler") != null));
System.out.println("Standard StAX XMLInputFactory: " + staxInputFactory);
System.out.println("Standard StAX XMLOutputFactory: " + staxOutputFactory);
System.out.println("Optimized TreeSet.addAll: " + hasOptimizedTreeSetAddAll());
To unsubscribe from this list please visit:
