mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
Resolved WW-3325 - do not serialize added by Javassist properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932712 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
*/
|
||||
package org.apache.struts2.json;
|
||||
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.json.annotations.JSON;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
@@ -38,11 +42,6 @@ import java.util.Map;
|
||||
import java.util.Stack;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.struts2.json.annotations.JSON;
|
||||
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Serializes an object into JavaScript Object Notation (JSON). If cyclic
|
||||
@@ -198,6 +197,14 @@ class JSONWriter {
|
||||
} catch (Exception ex) {
|
||||
LOG.debug(ex.getMessage(), ex);
|
||||
}
|
||||
} else if (clazz.getName().indexOf("$$_javassist") > -1) {
|
||||
try {
|
||||
baseAccessor = Class.forName(
|
||||
clazz.getName().substring(0, clazz.getName().indexOf("_$$")))
|
||||
.getMethod(accessor.getName(), accessor.getParameterTypes());
|
||||
} catch (Exception ex) {
|
||||
LOG.debug(ex.getMessage(), ex);
|
||||
}
|
||||
} else
|
||||
baseAccessor = accessor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user