tzulitai opened a new pull request #206:
URL: https://github.com/apache/flink-statefun/pull/206


   This was failing with an `Collection is empty` when attempting to copy the 
enum set of `TypeCharacteristic`s.
   
   I think the only reason we need to do a copy, is if users instantiate a 
`SimpleType` directly with the constructor (and not the `simpleTypeFrom`, 
`simpleImmutableTypeFrom` factory methods).
   IMO, we probably can expect users to just use the factory methods, and not 
the constructor.
   If they need to do anything more complex, they should just create a `Type` 
subclass directly.
   
   Therefore, this PR makes the constructor private to enforce instantiation a 
`SimpleType` via the factory methods.
   This would allow the constructor to be simpler and remove the 
`EnumSet.copyOf` operation.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to