LuciferYang commented on code in PR #46873:
URL: https://github.com/apache/spark/pull/46873#discussion_r1678908450


##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -3072,15 +3072,14 @@ private[spark] object Utils
    */
   lazy val isG1GC: Boolean = {
     Try {
+      // SPARK-48505: If the initialization probe of `HotSpotDiagnosticMXBean` 
is successful,
+      // the API of `HotSpotDiagnosticMXBean` can be used directly in 
subsequent operations,
+      // instead of invoking it through reflection.
       val clazz = 
Utils.classForName("com.sun.management.HotSpotDiagnosticMXBean")
-        .asInstanceOf[Class[_ <: PlatformManagedObject]]
-      val vmOptionClazz = Utils.classForName("com.sun.management.VMOption")
+      import com.sun.management.HotSpotDiagnosticMXBean

Review Comment:
   Thanks @dongjoon-hyun ,understood, that makes sense. Let's keep things as 
they are, I will close this pr.
   
   



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to