Skip to content

Add missing interfaces to emulated classes#10245

Merged
zbynek merged 1 commit intogwtproject:mainfrom
zbynek:emul-iface
Apr 23, 2026
Merged

Add missing interfaces to emulated classes#10245
zbynek merged 1 commit intogwtproject:mainfrom
zbynek:emul-iface

Conversation

@zbynek
Copy link
Copy Markdown
Collaborator

@zbynek zbynek commented Jan 6, 2026

Some missing interfaces found when working on #10208

Out of scope here:

  • adding default implementations to RandomGenerator (Implement RandomGenerator default methods up to Java 17 #10214)
  • adding Serializable to any classes
  • implementing methods in Constable / ConstantDesc -- only use those as tagging interfaces for now
  • adding Readable interface as it depends on nio
  • adding Cloneable to Locale
  • adding any new interfaces to java.lang.reflect or java.lang.invoke implemented by Class

@zbynek zbynek marked this pull request as ready for review January 6, 2026 17:47
@jnehlmeier
Copy link
Copy Markdown
Member

In a GWT fork at work I had added Serializable to ArrayDeque (and added a GWT-RPC CustomFieldSerializer for it) but ArrayDeque does not appear here. Maybe you missed some more classes?

@niloc132
Copy link
Copy Markdown
Member

niloc132 commented Jan 6, 2026

There are definitely some others that are missing too, mostly collections - I think those are going to get a closer look before adding them.

@zbynek
Copy link
Copy Markdown
Collaborator Author

zbynek commented Jan 6, 2026

Maybe you missed some more classes?

I did not add Serializable to any class here and I'm not planning to do that, I'm leaving that to someone with more experience with GWT RPC.

Out of public classes, these are serializable in JRE but not in GWT:

  • java.lang.Class
  • java.lang.StringBuffer
  • java.lang.StringBuilder
  • java.util.AbstractMap$SimpleEntry
  • java.util.AbstractMap$SimpleImmutableEntry
  • java.util.ArrayDeque
  • java.util.BitSet
  • java.util.EnumMap
  • java.util.EnumSet
  • java.util.EventObject
  • java.util.Locale
  • java.util.PriorityQueue
  • java.util.Random
  • java.util.concurrent.ConcurrentHashMap
  • java.util.concurrent.atomic.AtomicReference
  • java.util.concurrent.atomic.AtomicReferenceArray

Also there are other issues related to serializing private collection classes (#10048, #3071)

@zbynek zbynek added the ready This PR has been reviewed by a maintainer and is ready for a CI run. label Jan 6, 2026
@zbynek zbynek requested a review from niloc132 April 1, 2026 21:49
Copy link
Copy Markdown
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

LGTM, we can try to address some of the others later, though some (Locale, Random, Class to name three) probably won't make sense ever.

@zbynek zbynek merged commit 6a2216c into gwtproject:main Apr 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category-JRE ready This PR has been reviewed by a maintainer and is ready for a CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants