diff --git a/src/main/java/org/bsplines/languagetool_languageserver/LanguageToolLanguageServer.java b/src/main/java/org/bsplines/languagetool_languageserver/LanguageToolLanguageServer.java index d0189ce4..616cdf12 100644 --- a/src/main/java/org/bsplines/languagetool_languageserver/LanguageToolLanguageServer.java +++ b/src/main/java/org/bsplines/languagetool_languageserver/LanguageToolLanguageServer.java @@ -263,7 +263,7 @@ public CompletableFuture>> codeAction( result.add(Either.forRight(codeAction)); } - { + if (match.getSentence() != null) { String sentence = match.getSentence().getText().trim(); Matcher matcher = Pattern.compile("Dummy[0-9]+").matcher(sentence); StringBuilder sentencePatternStringBuilder = new StringBuilder();