flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [09/11] flink git commit: [FLINK-6724] Include class name in UDFUtils#checkForInstantiation exceptions
Date Thu, 01 Jun 2017 10:57:13 GMT
[FLINK-6724] Include class name in UDFUtils#checkForInstantiation exceptions

This closes #3995.


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

Branch: refs/heads/master
Commit: 417b4f65961bec2c5b56faec114de1c083ea4e09
Parents: ceaf5b6
Author: zentol <chesnay@apache.org>
Authored: Fri May 26 09:29:00 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Thu Jun 1 11:15:29 2017 +0200

----------------------------------------------------------------------
 .../table/functions/utils/UserDefinedFunctionUtils.scala    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/417b4f65/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
index 2008711..89b31f2 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
@@ -45,14 +45,15 @@ object UserDefinedFunctionUtils {
     */
   def checkForInstantiation(clazz: Class[_]): Unit = {
     if (!InstantiationUtil.isPublic(clazz)) {
-      throw ValidationException("Function class is not public.")
+      throw ValidationException(s"Function class ${clazz.getCanonicalName} is not public.")
     }
     else if (!InstantiationUtil.isProperClass(clazz)) {
-      throw ValidationException("Function class is no proper class, it is either abstract,"
+
-        " an interface, or a primitive type.")
+      throw ValidationException(s"Function class ${clazz.getCanonicalName} is no proper class,"
+
+        " it is either abstract, an interface, or a primitive type.")
     }
     else if (InstantiationUtil.isNonStaticInnerClass(clazz)) {
-      throw ValidationException("The class is an inner class, but not statically accessible.")
+      throw ValidationException(s"The class ${clazz.getCanonicalName} is an inner class,
but" +
+        " not statically accessible.")
     }
   }
 


Mime
View raw message