fix npe in dev mode when source is missing in recompilation diagnostic #1541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
I have found a NPE bug in dev-mode that occurs when recompiling. It happens when the "source" is null on a diagnostic.
I have created a small project that reproduces the error when using the Apache TinkerPop Gremlin Core dependency : https://github.com/devauxbr/quarkus-npe-dev-mode
Playing with the debugger, I have found that the diagnostic causing this error is warning about incompatible supported source from the GremlinDslProcessor
Once fixed with this pull request, the full warning message is :
Supported source version 'RELEASE_8' from annotation processor 'org.apache.tinkerpop.gremlin.process.traversal.dsl.GremlinDslProcessor' less than -source '11', line -1 in [unknown source]2019-03-17 15:35:41,316 INFO [com.bde.qua.tes.AppLifecycleBean] (XNIO-1 task-1) The application is stopping... {}
My environment :
Mac OSX Mojave
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
graalvm-ce-1.0.0-rc13