-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Serializable objects should have a "readResolve" method synthesized #4440
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
Labels
Comments
I have started working on this one. |
ingarabr
added a commit
to ingarabr/dotty
that referenced
this issue
May 3, 2018
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
ingarabr
added a commit
to ingarabr/dotty
that referenced
this issue
May 7, 2018
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
ingarabr
added a commit
to ingarabr/dotty
that referenced
this issue
May 7, 2018
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
ingarabr
added a commit
to ingarabr/dotty
that referenced
this issue
May 7, 2018
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
ingarabr
added a commit
to ingarabr/dotty
that referenced
this issue
May 7, 2018
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
smarter
pushed a commit
to smarter/dotty
that referenced
this issue
Jan 21, 2019
If the object implements the serializable interface and not includes the readResolve method then we add it. Since it's an object we reference it to the objects singleton instance. Resolves issue scala#4440
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 22, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serializable in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 22, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 22, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 22, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to smarter/dotty
that referenced
this issue
Jan 25, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 25, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 25, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Jan 25, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 25, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 26, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 2, 2019
In scala#4450 and Scala 2.12, readResolve is used to make sure deserializing an object returns the singleton instance of the object, but this doesn't prevent the fields of the objects from being serialized in the first place even though they're not used. Scala 2.13 switched to using writeReplace to completely bypass serialization of the object in scala/scala#7297. This commit adapts this to Dotty. Co-Authored-By: Ingar Abrahamsen <[email protected]> Co-Authored-By: Jason Zaugg <[email protected]>
smarter
added a commit
that referenced
this issue
Feb 2, 2019
Fix #4440: Do not serialize the content of static objects
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See explanation in https://github.com/scala/scala/blob/a9275b50e425d29c0b7fd45c10317953d5bf7804/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala#L319-L324
In Dotty this should be done in https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/transform/SyntheticMethods.scala
The text was updated successfully, but these errors were encountered: