[ https://issues.apache.org/jira/browse/SPARK-42803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700529#comment-17700529 ]
Apache Spark commented on SPARK-42803: -------------------------------------- User 'NarekDW' has created a pull request for this issue: https://github.com/apache/spark/pull/40422 > 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 > Priority: Minor > 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