redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
43 stars 15 forks source link

NPE when validating Qute template where a method is invoked #748

Closed datho7561 closed 2 years ago

datho7561 commented 2 years ago

Given the following Qute template, where the object "map" is not declared anywhere:

{map.get("string")}

map is marked properly with a warning, however, there is an NPE in the output related to trying to validate get(...)

angelozerr commented 2 years ago

My PR https://github.com/redhat-developer/quarkus-ls/pull/743 should fix this issue with a test.

angelozerr commented 2 years ago

This issue is fixed by https://github.com/redhat-developer/quarkus-ls/pull/743 and it exists a test in https://github.com/redhat-developer/quarkus-ls/blob/ed5e29ae65842e592d6ff8ab278c178b132ae08b/qute.ls/com.redhat.qute.ls/src/test/java/com/redhat/qute/services/diagnostics/QuteDiagnosticsInExpressionTest.java#L731