-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #645 from Zetmas/feature/issue#632
Detect and handle circular references when parsing Java beans
- Loading branch information
Showing
3 changed files
with
165 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.json.junit.data; | ||
|
||
/** | ||
* test class for verifying if recursively defined bean can be correctly identified | ||
* @author Zetmas | ||
* | ||
*/ | ||
public class RecursiveBean { | ||
private String name; | ||
private Object reference; | ||
private Object reference2; | ||
public String getName() { return name; } | ||
public Object getRef() {return reference;} | ||
public Object getRef2() {return reference2;} | ||
public void setRef(Object refObj) {reference = refObj;} | ||
public void setRef2(Object refObj) {reference2 = refObj;} | ||
|
||
public RecursiveBean(String name) { | ||
this.name = name; | ||
reference = null; | ||
reference2 = null; | ||
} | ||
} |