in case you are interested in Spark...
Jan. 31st, 2017 03:04 pm// Set name from main class if not given name = Option(name).orElse(Option(mainClass)).orNull if (name == null && primaryResource != null) { name = Utils.stripDirectory(primaryResource) }
Just a chunk of their funny shitty code.
FYI,
var name: String = null
I'd rewrite all that crap, but it's not only code, I'm afraid. It's the whole Spark world that needs a doctor.