Log Message
Merge handling of possible null into branch.
Modified Paths
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/FieldDictionary.java
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/SerializableConverter.java
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/FieldAliasingMapper.java
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/ImplicitCollectionMapper.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/FieldDictionary.java (2217 => 2218)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/FieldDictionary.java 2014-01-21 18:35:29 UTC (rev 2217)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/FieldDictionary.java 2014-01-21 18:46:03 UTC (rev 2218)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2005, 2006 Joe Walnes.
- * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -122,7 +122,7 @@
synchronized (this) {
if (!keyedByFieldNameCache.containsKey(type)) {
final List superClasses = new ArrayList();
- while (!Object.class.equals(cls)) {
+ while (!Object.class.equals(cls) && cls != null) {
superClasses.add(0, cls);
cls = cls.getSuperclass();
}
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/SerializableConverter.java (2217 => 2218)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/SerializableConverter.java 2014-01-21 18:35:29 UTC (rev 2217)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/SerializableConverter.java 2014-01-21 18:46:03 UTC (rev 2218)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2005, 2006 Joe Walnes.
- * Copyright (C) 2006, 2007, 2008, 2010, 2011, 2012, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2010, 2011, 2012, 2013, 2014 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -311,7 +311,7 @@
protected List hierarchyFor(Class type) {
List result = new ArrayList();
- while(type != Object.class) {
+ while(type != Object.class && type != null) {
result.add(type);
type = type.getSuperclass();
}
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/FieldAliasingMapper.java (2217 => 2218)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/FieldAliasingMapper.java 2014-01-21 18:35:29 UTC (rev 2217)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/FieldAliasingMapper.java 2014-01-21 18:46:03 UTC (rev 2218)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 Joe Walnes.
- * Copyright (C) 2006, 2007, 2008, 2009, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2013, 2014 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -71,7 +71,9 @@
private String getMember(Class type, String name, Map map) {
String member = null;
- for (Class declaringType = type; member == null && declaringType != Object.class; declaringType = declaringType.getSuperclass()) {
+ for (Class declaringType = type;
+ member == null && declaringType != Object.class && declaringType != null;
+ declaringType = declaringType.getSuperclass()) {
member = (String) map.get(key(declaringType, name));
}
return member;
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/ImplicitCollectionMapper.java (2217 => 2218)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/ImplicitCollectionMapper.java 2014-01-21 18:35:29 UTC (rev 2217)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/mapper/ImplicitCollectionMapper.java 2014-01-21 18:46:03 UTC (rev 2218)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 Joe Walnes.
- * Copyright (C) 2006, 2007, 2009, 2011, 2012, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2009, 2011, 2012, 2013, 2014 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -92,7 +92,7 @@
public void add(Class definedIn, String fieldName, String itemFieldName, Class itemType, String keyFieldName) {
Field field = null;
Class declaredIn = definedIn;
- while (declaredIn != Object.class) {
+ while (declaredIn != Object.class && definedIn != null) {
try {
field = declaredIn.getDeclaredField(fieldName);
break;
To unsubscribe from this list please visit:
