You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/07/08 11:51:00 UTC
[jira] [Commented] (SPARK-39724) Remove duplicate `.setAccessible(true)` in `kvstore.KVTypeInfo`
[ https://issues.apache.org/jira/browse/SPARK-39724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17564248#comment-17564248 ]
Apache Spark commented on SPARK-39724:
--------------------------------------
User 'LuciferYang' has created a pull request for this issue:
https://github.com/apache/spark/pull/37136
> Remove duplicate `.setAccessible(true)` in `kvstore.KVTypeInfo`
> ----------------------------------------------------------------
>
> Key: SPARK-39724
> URL: https://issues.apache.org/jira/browse/SPARK-39724
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 3.4.0
> Reporter: Yang Jie
> Priority: Minor
>
> {code:java}
> for (Method m : type.getDeclaredMethods()) {
> KVIndex idx = m.getAnnotation(KVIndex.class);
> if (idx != null) {
> checkIndex(idx, indices);
> Preconditions.checkArgument(m.getParameterTypes().length == 0,
> "Annotated method %s::%s should not have any parameters.", type.getName(), m.getName());
> m.setAccessible(true);
> indices.put(idx.value(), idx);
> m.setAccessible(true);
> accessors.put(idx.value(), new MethodAccessor(m));
> } {code}
> The above code has duplicate calls to `.setAccessible(true)`.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org