edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
715 stars 107 forks source link

Requires a function that explicitly informs when a required attribute is missing. #200

Open yebgi83 opened 2 years ago

yebgi83 commented 2 years ago

If both launch and uri properties are missing, a NullPointerException error occurs like below.

java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535) at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:457) at java.lang.ClassLoader.loadClass(ClassLoader.java:398) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at fxlauncher.AbstractLauncher.createApplicationEnvironment(AbstractLauncher.java:175) at fxlauncher.Launcher.lambda$start$0(Launcher.java:162) at java.lang.Thread.run(Thread.java:748)

However, these exceptions make it difficult to find the cause.

If there is a missing property necessary for the operation, such as uri or launch attributes, I hope it will be explicitly provided as an exception.

That way, even if the required attributes are missing, I think we can quickly find the cause.