Skip to content

Commit 8aec16e

Browse files
Copilotnixel2007
andcommitted
Initialize parsedStrTemplateMethods field directly to avoid null check
Co-authored-by: nixel2007 <[email protected]>
1 parent bc8faac commit 8aec16e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/com/github/_1c_syntax/bsl/languageserver/configuration/semantictokens/SemanticTokensOptions.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class SemanticTokensOptions {
7979
* Кэшированные разобранные паттерны функций-шаблонизаторов.
8080
*/
8181
@JsonIgnore
82-
private ParsedStrTemplateMethods parsedStrTemplateMethods;
82+
private ParsedStrTemplateMethods parsedStrTemplateMethods = parseStrTemplateMethods(DEFAULT_STR_TEMPLATE_METHODS);
8383

8484
/**
8585
* Устанавливает список паттернов функций-шаблонизаторов и пересчитывает кэш.
@@ -98,9 +98,6 @@ public void setStrTemplateMethods(List<String> strTemplateMethods) {
9898
*/
9999
@JsonIgnore
100100
public ParsedStrTemplateMethods getParsedStrTemplateMethods() {
101-
if (parsedStrTemplateMethods == null) {
102-
parsedStrTemplateMethods = parseStrTemplateMethods(strTemplateMethods);
103-
}
104101
return parsedStrTemplateMethods;
105102
}
106103

0 commit comments

Comments
 (0)