flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhue...@apache.org
Subject [2/2] flink git commit: [FLINK-2874] Fix recognition of Scala default setters
Date Fri, 23 Oct 2015 08:51:42 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/ab694a3b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ab694a3b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ab694a3b

Branch: refs/heads/release-0.9
Commit: ab694a3b22a88bfc5e911eae0c1e313073b6fd57
Parents: 4392cf2
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 10:27:59 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/ab694a3b/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 e15650f..015f196 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
@@ -1272,7 +1272,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