You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/27 16:33:25 UTC

[GitHub] srowen commented on issue #23903: [SPARK-26977][CORE] Fix warn against subclassing scala.App

srowen commented on issue #23903: [SPARK-26977][CORE] Fix warn against subclassing scala.App
URL: https://github.com/apache/spark/pull/23903#issuecomment-467933318
 
 
   I just tried compiling `object MyApp extends scala.App` with Scala 2.12 and I get in the bytecode...
   `public final class MyApp$ implements scala/App`.
   `class MyApp extends scala.App` yields `public class MyApp implements scala/App`. I don't see any `childMainClass`, etc.
   
   I am actually not sure if this ever worked with the `class` version... it tries to invoke a static main() method, but these classes don't get a static main(); they get a non-static main() though.
   
   I find that the current check works if you check whether "MyApp$" extends `scala.App`.
   I'd suggest we just add that to the condition?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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