flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetzger <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-1471][java-api] Fixes wrong input valid...
Date Wed, 04 Feb 2015 10:05:20 GMT
Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/359#discussion_r24073064
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
---
    @@ -680,10 +680,20 @@ private static void validateInputType(Type t, TypeInformation<?>
inType) {
     		}
     	}
     	
    -	private static void validateInputType(Class<?> baseClass, Class<?> clazz,
int inputParamPos, TypeInformation<?> inType) {
    +	private static void validateInputType(Class<?> baseClass, Class<?> clazz,
int inputParamPos, TypeInformation<?> inTypeInfo) {
     		ArrayList<Type> typeHierarchy = new ArrayList<Type>();
    +
    +		// try to get generic parameter
    +		Type inType;
    +		try {
    +			inType = getParameterType(baseClass, typeHierarchy, clazz, inputParamPos);
    +		}
    +		catch (Exception e) {
    +			return; // skip input validation e.g. for raw types
    --- End diff --
    
    are we sure that we can ignore all exceptions?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message