-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added fix to handle references to types that extend other types
- Loading branch information
Showing
7 changed files
with
90 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# speed up Gradle | ||
#org.gradle.daemon=true | ||
|
||
version = 0.1.0 | ||
version = 0.2.0 | ||
group = org.immutizer4j |
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,14 @@ | ||
package org.immutizer4j.test.sample; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* A POJO that extends the parent POJO | ||
* Used for testing whether we check all fields in an object's inheritance hierarchy | ||
*/ | ||
@Data @EqualsAndHashCode(callSuper = true) | ||
public class ChildPojo extends ParentPojo { | ||
private final int childImmutableInt = 0; | ||
private int childMutableInt = 0; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/org/immutizer4j/test/sample/ChildPojoReferencePojo.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,14 @@ | ||
package org.immutizer4j.test.sample; | ||
|
||
import lombok.Value; | ||
|
||
/** | ||
* A POJO that references ChildPojo | ||
* We want to ensure that when it walks down the object graph, it goes up the inheritance hierarchy not just for the | ||
* root object but for every referenced type as well | ||
*/ | ||
@Value | ||
public class ChildPojoReferencePojo { | ||
// final refernce to a mutable POJO with mutable fields in both parent and concrete type | ||
private ChildPojo childPojo; | ||
} |
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,13 @@ | ||
package org.immutizer4j.test.sample; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* A POJO that will be used as an ancestor for other POJOs | ||
* Contains a mix of mutable and non-mutable fields | ||
*/ | ||
@Data | ||
public class ParentPojo { | ||
private final int parentImmutableInt = 0; | ||
private int paretMutableInt = 0; | ||
} |