pan3793 commented on code in PR #4879:
URL: https://github.com/apache/kyuubi/pull/4879#discussion_r1217916816


##########
kyuubi-util-scala/src/main/scala/org/apache/kyuubi/util/reflect/ReflectUtils.scala:
##########
@@ -37,32 +37,47 @@ object ReflectUtils {
       DynClasses.builder().loader(cl).impl(className).buildChecked()
     }.isSuccess
 
-  def getFieldVal[T](target: Any, fieldName: String): T =
+  def getField[T](target: Any, fieldName: String): T = {
+    val targetClass = target.getClass
     Try {

Review Comment:
   the scala `Try` does not help here and may miss FatalError, instead, `try 
... catch ...` is more suitable



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to