This is an automated email from the ASF dual-hosted git repository.
huaxingao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 7ad37925afb [SPARK-39724][CORE] Remove duplicate
`.setAccessible(true)` call in `kvstore.KVTypeInfo`
7ad37925afb is described below
commit 7ad37925afb1441a49ba3cbd8528e67240b9fd0b
Author: yangjie01 <[email protected]>
AuthorDate: Sat Jul 9 15:34:40 2022 -0700
[SPARK-39724][CORE] Remove duplicate `.setAccessible(true)` call in
`kvstore.KVTypeInfo`
### What changes were proposed in this pull request?
This pr just remove duplicate `.setAccessible(true)` call in
`kvstore.KVTypeInfo`.
### Why are the changes needed?
Delete unnecessary method invokes
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass GitHub Actions
Closes #37136 from LuciferYang/remove-dup-setAccessible.
Authored-by: yangjie01 <[email protected]>
Signed-off-by: huaxingao <[email protected]>
---
.../kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java | 2 --
1 file changed, 2 deletions(-)
diff --git
a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java
b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java
index a7e5831846a..a15d07cf599 100644
--- a/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java
+++ b/common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVTypeInfo.java
@@ -48,7 +48,6 @@ public class KVTypeInfo {
checkIndex(idx, indices);
f.setAccessible(true);
indices.put(idx.value(), idx);
- f.setAccessible(true);
accessors.put(idx.value(), new FieldAccessor(f));
}
}
@@ -61,7 +60,6 @@ public class KVTypeInfo {
"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));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]