flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhue...@apache.org
Subject [4/4] flink git commit: [FLINK-2874] Fix recognition of Scala default setters
Date Fri, 23 Oct 2015 08:07:56 GMT
[FLINK-2874] Fix recognition of Scala default setters


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/cd7ed8e3
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/cd7ed8e3
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/cd7ed8e3

Branch: refs/heads/master
Commit: cd7ed8e38c0d0e1313f5759e7bf34e0904972c6e
Parents: 17e7b42
Author: Fabian Hueske <fhueske@apache.org>
Authored: Fri Oct 23 00:06:55 2015 +0200
Committer: Fabian Hueske <fhueske@apache.org>
Committed: Fri Oct 23 00:06:55 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/flink/api/java/typeutils/TypeExtractor.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/cd7ed8e3/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
index 0281da6..782d58d 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
@@ -1311,7 +1311,9 @@ public class TypeExtractor {
 				fieldType = materializeTypeVariable(typeHierarchy, (TypeVariable<?>)fieldType);
 			}
 			for(Method m : clazz.getMethods()) {
-				final String methodNameLow = m.getName().toLowerCase().replaceAll("_", "");
+				final String methodNameLow = m.getName().endsWith("_$eq") ?
+						m.getName().toLowerCase().replaceAll("_", "").replaceFirst("\\$eq$", "_\\$eq") :
+						m.getName().toLowerCase().replaceAll("_", "");
 
 				// check for getter
 				if(	// The name should be "get<FieldName>" or "<fieldName>" (for scala) or
"is<fieldName>" for boolean fields.


Mime
View raw message