klion26 commented on a change in pull request #9882: [FLINK-1430][Flink-Core] 
Type Extractor Setter
URL: https://github.com/apache/flink/pull/9882#discussion_r334214888
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
 ##########
 @@ -1803,7 +1803,7 @@ private boolean isValidPojoField(Field f, Class<?> 
clazz, ArrayList<Type> typeHi
                                        m.getParameterTypes().length == 1 && // 
one parameter of the field's type
                                        
(m.getGenericParameterTypes()[0].equals( fieldType ) || (fieldTypeWrapper != 
null && m.getParameterTypes()[0].equals( fieldTypeWrapper )) || 
(fieldTypeGeneric != null && 
m.getGenericParameterTypes()[0].equals(fieldTypeGeneric) ) )&&
                                        // return type is void.
-                                       m.getReturnType().equals(Void.TYPE)
+                                       (m.getReturnType().equals(Void.TYPE) || 
m.getReturnType().equals(clazz))
 
 Review comment:
   would you mind updating the comment also?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to