Skip to content

Commit

Permalink
Merge branch '2.5.x' into 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Jun 17, 2015
2 parents 8373a40 + 009e554 commit 1b8dd2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES

SECTION 2: Apache License, V2.0

>>> ant-1.8.4
>>> ant-1.9.4
>>> commons-codec.commons-codec-1.6
>>> commons-collections-3.2.1
>>> commons-fileupload-1.3.1
Expand Down Expand Up @@ -475,7 +475,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Apache License, V2.0 is applicable to the following component(s).


>>> ant-1.8.4
>>> ant-1.9.4

Apache License
Version 2.0, January 2004
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ext {
isTravisBuild = System.getenv().get("TRAVIS") == 'true'

antTraxVersion = "1.7.1"
antVersion = "1.9.3"
antVersion = "1.9.4"
aspectjVersion = "1.8.5" // use same version as org.springframework:spring-aspects uses
commonsCliVersion = "1.2"
commonsCollectionsVersion = "3.2.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ public void setTarget(Object target) {
protected void handleCircularRelationship(Object o) throws ConverterException {
switch (circularReferenceBehaviour) {
case DEFAULT:
if (!(Map.class.isAssignableFrom(o.getClass()) || Collection.class.isAssignableFrom(o.getClass()))) {
final boolean isCollection = Collection.class.isAssignableFrom(o.getClass());
final boolean isMap = Map.class.isAssignableFrom(o.getClass());
if (!(isMap || isCollection)) {
Map<String, Object> props = new HashMap<String, Object>();
props.put("class", o.getClass());
StringBuilder ref = new StringBuilder();
Expand All @@ -357,6 +359,14 @@ protected void handleCircularRelationship(Object o) throws ConverterException {
props.put("_ref", ref.substring(0, ref.length() - 1));
value(props);
}
else {
if(isMap) {
writer.object(); writer.endObject();
}
else {
writer.array(); writer.endArray();
}
}
break;
case EXCEPTION:
throw new ConverterException("Circular Reference detected: class " + o.getClass().getName());
Expand Down

0 comments on commit 1b8dd2d

Please sign in to comment.