[ https://issues.apache.org/jira/browse/FLINK-6268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15958739#comment-15958739 ]
ASF GitHub Bot commented on FLINK-6268: --------------------------------------- Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3680 @zentol thanks for the review. I pushed a second commit to mark the added static methods as `@Internal` and renamed from `asLeft/Right` to `obtainLeft/Right`. > Object reuse for Either type > ---------------------------- > > Key: FLINK-6268 > URL: https://issues.apache.org/jira/browse/FLINK-6268 > Project: Flink > Issue Type: Improvement > Components: Core > Affects Versions: 1.3.0 > Reporter: Greg Hogan > Assignee: Greg Hogan > Priority: Minor > > While reviewing test coverage for FLINK-4705 I have come across that > {{Either}} only implements partial object reuse (when from and to are both > {{Right}}). We can implement full object reuse if {{Left}} stores a reference > to a {{Right}} and {{Right}} to a {{Left}}. These references will be > {{private}} and will remain {{null}} until set by {{EitherSerializer}} when > copying or deserializing with object reuse. -- This message was sent by Atlassian JIRA (v6.3.15#6346)