Skip to content
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

Backport: # 2870 Fix Java Serialization warnings for Tuple #2869

Conversation

KrnSaurabh
Copy link
Contributor

@KrnSaurabh KrnSaurabh commented Sep 30, 2024

backport #2870

@KrnSaurabh KrnSaurabh changed the title Fix Java Serialization warnings for Tuple Backport: # 2870 Fix Java Serialization warnings for Tuple Sep 30, 2024
@KrnSaurabh KrnSaurabh marked this pull request as draft September 30, 2024 20:48
@@ -1953,7 +1953,7 @@ def generateMainClasses(): Unit = {
/$javadoc
* The ${j.ordinal} element of this tuple.
*/
public final T$j _$j;
transient public T$j _$j;
Copy link
Member

@pivovarit pivovarit Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transient means that you want to ignore field during serialization - tuple elements can't be ignored.

We also want them final.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. The transient modifier will likely break other serialization libraries, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an implementation added in this class for readObject() and writeObject() to explicitly serialize and deserialize these fields so that they are not ignored.

@pivovarit
Copy link
Member

I've taken care of Tuples here: #2872, feel free to have a look at the rest

@KrnSaurabh KrnSaurabh closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants