Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/3305#discussion_r101067289 --- Diff: flink-core/src/main/java/org/apache/flink/api/common/state/ListStateDescriptor.java --- @@ -62,10 +68,19 @@ public ListStateDescriptor(String name, TypeInformation<T> typeInfo) { * @param name The (unique) name for the state. * @param typeSerializer The type serializer for the list values. */ + @SuppressWarnings("unchecked") public ListStateDescriptor(String name, TypeSerializer<T> typeSerializer) { - super(name, typeSerializer, null); + super(name, new ListSerializer<>(typeSerializer), null); + } + + public TypeSerializer<T> getElementSerializer() { + if (!(serializer instanceof ListSerializer)) { + throw new IllegalStateException(); --- End diff -- We should add a meaningful error message.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---