-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace ThreadLocal with method argument
Set tracks types we've visited as we recurse.
- Loading branch information
Nicholas Blair
committed
Jan 4, 2017
1 parent
eed5c93
commit a2b8f2f
Showing
10 changed files
with
121 additions
and
41 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
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
11 changes: 3 additions & 8 deletions
11
hollow/src/test/java/com/netflix/hollow/core/write/objectmapper/DirectCircularReference.java
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 |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package com.netflix.hollow.core.write.objectmapper; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** | ||
* Sample type that represents a direct circular reference between 2 classes. | ||
*/ | ||
public class DirectCircularReference { | ||
|
||
private final String name; | ||
private final List<DirectCircularReference> children; | ||
private final DirectCircularReference child; | ||
|
||
public DirectCircularReference(String name) { | ||
this(name, Collections.<DirectCircularReference>emptyList()); | ||
} | ||
public DirectCircularReference(String name, List<DirectCircularReference> children) { | ||
public DirectCircularReference(String name, DirectCircularReference child) { | ||
this.name = name; | ||
this.children = children; | ||
this.child = child; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...src/test/java/com/netflix/hollow/core/write/objectmapper/DirectListCircularReference.java
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,18 @@ | ||
package com.netflix.hollow.core.write.objectmapper; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** | ||
* Sample type that represents a direct circular reference between 2 classes, with a List containing the child. | ||
*/ | ||
public class DirectListCircularReference { | ||
|
||
private final String name; | ||
private final List<DirectListCircularReference> children; | ||
|
||
public DirectListCircularReference(String name, List<DirectListCircularReference> children) { | ||
this.name = name; | ||
this.children = children; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../src/test/java/com/netflix/hollow/core/write/objectmapper/DirectMapCircularReference.java
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,17 @@ | ||
package com.netflix.hollow.core.write.objectmapper; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Sample type that represents a direct circular reference between 2 classes, with a Map containing the child. | ||
*/ | ||
public class DirectMapCircularReference { | ||
|
||
private final String name; | ||
private final Map<String, DirectMapCircularReference> children; | ||
|
||
public DirectMapCircularReference(String name, Map<String, DirectMapCircularReference> children) { | ||
this.name = name; | ||
this.children = children; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../src/test/java/com/netflix/hollow/core/write/objectmapper/DirectSetCircularReference.java
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,17 @@ | ||
package com.netflix.hollow.core.write.objectmapper; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* Sample type that represents a direct circular reference between 2 classes, with a Set containing the child. | ||
*/ | ||
public class DirectSetCircularReference { | ||
|
||
private final String name; | ||
private final Set<DirectSetCircularReference> children; | ||
|
||
public DirectSetCircularReference(String name, Set<DirectSetCircularReference> children) { | ||
this.name = name; | ||
this.children = children; | ||
} | ||
} |
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