Skip to content

Commit

Permalink
Bump spotbugs-maven-plugin from 4.2.3 to 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Jul 12, 2021
1 parent bad1034 commit a367f6a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-->
<FindBugsFilter>
<Match>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE,NP_NONNULL_PARAM_VIOLATION,NP_NONNULL_RETURN_VIOLATION,NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE,NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE,RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE,EI_EXPOSE_REP,EI_EXPOSE_REP2,NP_NONNULL_PARAM_VIOLATION,NP_NONNULL_RETURN_VIOLATION,NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE,NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE,RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<Class name="org.bsplines.ltexls.parsing.CodeAnnotatedTextBuilder"/>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.2.3</version>
<version>4.3.0</version>
<configuration>
<excludeFilterFile>.spotbugs-exclude.xml</excludeFilterFile>
<includeTests>true</includeTests>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class LanguageToolJavaInterface extends LanguageToolInterface {

public LanguageToolJavaInterface(String languageShortCode, String motherTongueShortCode,
int sentenceCacheSize, Set<String> dictionary) {
this.dictionary = dictionary;
this.dictionary = Set.copyOf(dictionary);

if (!Languages.isLanguageSupported(languageShortCode)) {
Tools.logger.severe(Tools.i18n("notARecognizedLanguage", languageShortCode));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.bsplines.ltexls.languagetool;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import org.bsplines.ltexls.parsing.AnnotatedTextFragment;
Expand Down Expand Up @@ -75,7 +76,7 @@ public String getMessage() {
}

public List<String> getSuggestedReplacements() {
return this.suggestedReplacements;
return Collections.unmodifiableList(this.suggestedReplacements);
}

public void setFromPos(int fromPos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public LatexCommandSignatureMatch(LatexCommandSignature commandSignature, String
this.toPos = (argumentPos.isEmpty()
? (fromPos + commandSignature.getPrefix().length())
: argumentPos.get(argumentPos.size() - 1).getValue());
this.argumentPos = argumentPos;
this.argumentPos = List.copyOf(argumentPos);
}

public LatexCommandSignature getCommandSignature() {
Expand Down

0 comments on commit a367f6a

Please sign in to comment.