-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[BUG] Transient properties in classes with @Jacksonized @Accessors(fluent=true) get serialized #3945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
liampace
wants to merge
9
commits into
projectlombok:master
Choose a base branch
from
liampace:issue-3936
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[BUG] Transient properties in classes with @Jacksonized @Accessors(fluent=true) get serialized #3945
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5254eab
Add transforms to include checks for transient field
liampace f315984
Refactor eclipse handler
liampace 657b62f
Refactor javac handlers
liampace 44e33be
Implement eclipse handler
liampace 62819db
Implement javac handler
liampace 0f62bb6
Remove redundant @JsonIgnore annotation
liampace 7aba7cf
Revert "Remove redundant @JsonIgnore annotation"
liampace a2bab5c
Add fields with `@JsonIgore` to test case
liampace 4edb266
Update handlers to account for pre-existing `@JsonIgnore` annotations
liampace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
62 changes: 62 additions & 0 deletions
62
test/transform/resource/after-delombok/JacksonizedAccessorsTransient.java
This file contains hidden or 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,62 @@ | ||
public class JacksonizedAccessorsTransient { | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
private transient int intValue; | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
private transient long longValue; | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
private double doubleValue; | ||
|
||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public int intValue() { | ||
return this.intValue; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public long longValue() { | ||
return this.longValue; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public double doubleValue() { | ||
return this.doubleValue; | ||
} | ||
|
||
/** | ||
* @return {@code this}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public JacksonizedAccessorsTransient intValue(final int intValue) { | ||
this.intValue = intValue; | ||
return this; | ||
} | ||
|
||
/** | ||
* @return {@code this}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public JacksonizedAccessorsTransient longValue(final long longValue) { | ||
this.longValue = longValue; | ||
return this; | ||
} | ||
|
||
/** | ||
* @return {@code this}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonIgnore | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public JacksonizedAccessorsTransient doubleValue(final double doubleValue) { | ||
this.doubleValue = doubleValue; | ||
return this; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
test/transform/resource/after-ecj/JacksonizedAccessorsTransient.java
This file contains hidden or 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,38 @@ | ||
public @lombok.extern.jackson.Jacksonized @lombok.experimental.Accessors(fluent = true) @lombok.Getter @lombok.Setter class JacksonizedAccessorsTransient { | ||
private transient @com.fasterxml.jackson.annotation.JsonIgnore int intValue; | ||
private transient @com.fasterxml.jackson.annotation.JsonIgnore long longValue; | ||
private @com.fasterxml.jackson.annotation.JsonIgnore double doubleValue; | ||
public JacksonizedAccessorsTransient() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated int intValue() { | ||
return this.intValue; | ||
} | ||
public @com.fasterxml.jackson.annotation.JsonIgnore @java.lang.SuppressWarnings("all") @lombok.Generated long longValue() { | ||
return this.longValue; | ||
} | ||
public @com.fasterxml.jackson.annotation.JsonIgnore @java.lang.SuppressWarnings("all") @lombok.Generated double doubleValue() { | ||
return this.doubleValue; | ||
} | ||
/** | ||
* @return {@code this}. | ||
*/ | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated JacksonizedAccessorsTransient intValue(final int intValue) { | ||
this.intValue = intValue; | ||
return this; | ||
} | ||
/** | ||
* @return {@code this}. | ||
*/ | ||
public @com.fasterxml.jackson.annotation.JsonIgnore @java.lang.SuppressWarnings("all") @lombok.Generated JacksonizedAccessorsTransient longValue(final long longValue) { | ||
this.longValue = longValue; | ||
return this; | ||
} | ||
/** | ||
* @return {@code this}. | ||
*/ | ||
public @com.fasterxml.jackson.annotation.JsonIgnore @java.lang.SuppressWarnings("all") @lombok.Generated JacksonizedAccessorsTransient doubleValue(final double doubleValue) { | ||
this.doubleValue = doubleValue; | ||
return this; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test/transform/resource/before/JacksonizedAccessorsTransient.java
This file contains hidden or 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,9 @@ | ||
@lombok.extern.jackson.Jacksonized | ||
@lombok.experimental.Accessors(fluent = true) | ||
@lombok.Getter | ||
@lombok.Setter | ||
public class JacksonizedAccessorsTransient { | ||
private transient int intValue; | ||
liampace marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@com.fasterxml.jackson.annotation.JsonIgnore private transient long longValue; | ||
@com.fasterxml.jackson.annotation.JsonIgnore private double doubleValue; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.