You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/10/22 09:35:27 UTC

[PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

LuciferYang opened a new pull request, #43477:
URL: https://github.com/apache/spark/pull/43477

   ### What changes were proposed in this pull request?
   This pr use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` due to `isAccessible` has been marked as deprecated since Java 9.
   
   https://github.com/openjdk/jdk/blob/ecd25e7d6f9d69f9dbdbff0a4a9b9d6b19288593/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java#L412-L428
   
   ```java
   /**
        * Get the value of the {@code accessible} flag for this reflected object.
        *
        * @return the value of the object's {@code accessible} flag
        *
        * @deprecated
        * This method is deprecated because its name hints that it checks
        * if the reflected object is accessible when it actually indicates
        * if the checks for Java language access control are suppressed.
        * This method may return {@code false} on a reflected object that is
        * accessible to the caller. To test if this reflected object is accessible,
        * it should use {@link #canAccess(Object)}.
        *
        * @revised 9
        */
       @Deprecated(since="9")
       public boolean isAccessible() {
           return override;
       }
   ```
   
   ### Why are the changes needed?
   Cleanup deprecated API usage.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Pass GitHub Actions
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43477:
URL: https://github.com/apache/spark/pull/43477#issuecomment-1774063380

   > Surprised this is the only place :-)
   
   Yes, I'm quite surprised as well :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43477:
URL: https://github.com/apache/spark/pull/43477#issuecomment-1776417261

   Thanks @dongjoon-hyun 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43477:
URL: https://github.com/apache/spark/pull/43477#issuecomment-1774417049

   Thanks @HyukjinKwon @mridulm and @beliefer ~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #43477: [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible`
URL: https://github.com/apache/spark/pull/43477


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45624][CORE][TESTS] Use `AccessibleObject#canAccess` instead of `AccessibleObject#isAccessible` [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #43477:
URL: https://github.com/apache/spark/pull/43477#issuecomment-1774281301

   Merged to master.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org