Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8178117

public state constructors for Int/Long/DoubleSummaryStatistics

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • None
    • core-libs
    • None
    • b31

      It's possible to extract the state from a Int/Long/DoubleSummaryStatistics with the getter methods, but it is not directly possible to reconstruct a new instance from that state (there are round about ways to do that which are not recommended by clever use of accepting and combining).

      These classes need public constructors that accept argument values representing the state that is returned by the getters.

      With such constructors its possible for third parties to independently serialize the state.

      It is not proposed to make these classes non-final and/or serializable.

            psandoz Paul Sandoz
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: