Open phiwu-gpdec opened 4 years ago
Also this nonsense below in the "Welcome to IntelliJ IDEA", of IntelliJ IDEA Version 2020.2, possibly from option setting.
java.lang.NullPointerException
at com.github.gtache.lsp.utils.FileUtils$.VFSToPath(FileUtils.scala:176)
at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderPath(FileUtils.scala:171)
at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderUri(FileUtils.scala:165)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$1(PluginMain.scala:135)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:268)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
No message NullPointer exceptions are a Red flag for lazy coding, for caller methods and called methods; at least guard called methods using Project Lombok @NonNull
, use of an Objects guard method with message etc., or better still throw a more useful Throwable with message, to flag null bugs. The only methods which don't need explicit null checks are private ones where you know that the reference parameter will always be null checked by a caller earlier.
I'll probably disable this annoyance for now, because I don't seem to use it much.
When i start IntelliJ 2020.1 and try to change configuration in welcome screen -> configure -> settings -> File and Code Templates, a null pointer exception is thrown: