-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat(java): support deserialization ignoreEnumDeserializeError #1623
feat(java): support deserialization ignoreEnumDeserializeError #1623
Conversation
ab544bd
to
8a9b153
Compare
8a9b153
to
a8dba5b
Compare
@@ -54,6 +54,7 @@ public class Config implements Serializable { | |||
private final boolean deserializeUnexistedClass; | |||
private final boolean scalaOptimizationEnabled; | |||
private transient int configHash; | |||
private final boolean enumDeserializeErrorIgnored; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about naming it as deserializeUnexistentEnumValueAsNull
@@ -49,7 +49,7 @@ public void write(MemoryBuffer buffer, Enum value) { | |||
@Override | |||
public Enum read(MemoryBuffer buffer) { | |||
int value = buffer.readVarUint32Small7(); | |||
if (fury.getConfig().isEnumDeserializeErrorIgnored() && value >= enumConstants.length) { | |||
if (fury.getConfig().isDeserializeUnexistentEnumValueAsNull() && value >= enumConstants.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (fury.getConfig().isDeserializeUnexistentEnumValueAsNull() && value >= enumConstants.length) { | |
if (fury.getConfig().deserializeUnexistentEnumValueAsNull() && value >= enumConstants.length) { |
134ef3c
to
d64b43d
Compare
ci/format.sh
Outdated
@@ -25,6 +25,8 @@ install_nodejs() { | |||
node -v | |||
npm -v | |||
} | |||
export python=/home/t5/weijiang/work/score/fury/1/Python-3.8.18/python3.8/bin/python3.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
ci/format.sh
Outdated
@@ -180,7 +182,7 @@ format_all_scripts() { | |||
} | |||
|
|||
format_java() { | |||
if command -v mvn >/dev/null ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this
@@ -100,6 +102,10 @@ public boolean isStringRefIgnored() { | |||
return stringRefIgnored; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Javadoc here
@@ -100,6 +102,10 @@ public boolean isStringRefIgnored() { | |||
return stringRefIgnored; | |||
} | |||
|
|||
public boolean isDeserializeUnexistentEnumValueAsNull() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to deserializeUnexistentEnumValueAsNull
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Related issues
Does this PR introduce any user-facing change?
Benchmark