Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/6037#discussion_r189885082
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/io/CsvReader.java ---
@@ -316,14 +317,18 @@ public CsvReader ignoreInvalidLines(){
Preconditions.checkNotNull(pojoType, "The POJO type class must
not be null.");
Preconditions.checkNotNull(pojoFields, "POJO fields must be
specified (not null) if output type is a POJO.");
- @SuppressWarnings("unchecked")
- PojoTypeInfo<T> typeInfo = (PojoTypeInfo<T>)
TypeExtractor.createTypeInfo(pojoType);
+ final TypeInformation<T> ti =
TypeExtractor.createTypeInfo(pojoType);
+ if (!(ti instanceof PojoTypeInfo)) {
+ throw new IllegalArgumentException(
+ "The specified class is not a POJO. The type
class must meet the POJO requirements. Found: " + ti);
--- End diff --
Yes, somewhere hidden in the documentation. I will fix this shortcoming as
part of FLINK-8293 for 1.6.
---