Narek Karapetian created SPARK-42803:
----------------------------------------

             Summary: Use getParameterCount function instead of 
getParameterTypes.length
                 Key: SPARK-42803
                 URL: https://issues.apache.org/jira/browse/SPARK-42803
             Project: Spark
          Issue Type: Improvement
          Components: ML, Spark Core, SQL
    Affects Versions: 3.3.3
            Reporter: Narek Karapetian
             Fix For: 3.3.2


Since jdk1.8 there is an additional function in reflection API 
{{{}getParameterCount{}}}, it is better to use that function instead of 
{{getParameterTypes.length}} because {{getParameterTypes}} function makes a 
copy of the parameter types array every invocation.

This will help to avoid redundant arrays creation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to