Skip to content

Commit

Permalink
add null check for the exception cause
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-fan committed Apr 28, 2021
1 parent 86d3bb5 commit 5cfb3c2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ trait InvokeLike extends Expression with NonSQLExpression {
method.invoke(obj, args: _*)
} catch {
// Re-throw the original exception.
case e: java.lang.reflect.InvocationTargetException => throw e.getCause
case e: java.lang.reflect.InvocationTargetException if e.getCause != null =>
throw e.getCause
}
val boxedClass = ScalaReflection.typeBoxedJavaMapping.get(dataType)
if (boxedClass.isDefined) {
Expand Down

0 comments on commit 5cfb3c2

Please sign in to comment.