Skip to content

Commit 83d652c

Browse files
dependabot[bot]tobiasdiez
authored andcommitted
Bump checkstyle from 8.19 to 8.20 (#4928)
* Bump checkstyle from 8.19 to 8.20 Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.19 to 8.20. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-8.19...checkstyle-8.20) Signed-off-by: dependabot[bot] <[email protected]> * Fix checkstyle * Fix checkstyle
1 parent 8414457 commit 83d652c

26 files changed

+10
-68
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ dependencies {
173173
testCompile "org.testfx:testfx-core:4.0.+"
174174
testCompile "org.testfx:testfx-junit5:4.0.+"
175175

176-
checkstyle 'com.puppycrawl.tools:checkstyle:8.19'
176+
checkstyle 'com.puppycrawl.tools:checkstyle:8.20'
177177
}
178178

179179
jacoco {

src/main/java/org/jabref/gui/autocompleter/SuggestionProvider.java

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.util.ArrayList;
3030
import java.util.Arrays;
3131
import java.util.Collection;
32-
import java.util.Collections;
3332
import java.util.Comparator;
3433
import java.util.HashSet;
3534
import java.util.List;
@@ -55,7 +54,6 @@ public abstract class SuggestionProvider<T> implements Callback<ISuggestionReque
5554
/**
5655
* Create a default suggestion provider based on the toString() method of the generic objects
5756
* @param possibleSuggestions All possible suggestions
58-
* @return
5957
*/
6058
public static <T> SuggestionProvider<T> create(Collection<T> possibleSuggestions) {
6159
return create(null, possibleSuggestions);
@@ -67,7 +65,6 @@ public static <T> SuggestionProvider<T> create(Collection<T> possibleSuggestions
6765
*
6866
* @param stringConverter A stringConverter which converts generic T into a string
6967
* @param possibleSuggestions All possible suggestions
70-
* @return
7168
*/
7269
public static <T> SuggestionProvider<T> create(Callback<T, String> stringConverter, Collection<T> possibleSuggestions) {
7370
SuggestionProviderString<T> suggestionProvider = new SuggestionProviderString<>(stringConverter);
@@ -77,15 +74,13 @@ public static <T> SuggestionProvider<T> create(Callback<T, String> stringConvert
7774

7875
/**
7976
* Add the given new possible suggestions to this SuggestionProvider
80-
* @param newPossible
8177
*/
8278
public void addPossibleSuggestions(@SuppressWarnings("unchecked") T... newPossible) {
8379
addPossibleSuggestions(Arrays.asList(newPossible));
8480
}
8581

8682
/**
8783
* Add the given new possible suggestions to this SuggestionProvider
88-
* @param newPossible
8984
*/
9085
public void addPossibleSuggestions(Collection<T> newPossible) {
9186
synchronized (possibleSuggestionsLock) {
@@ -113,39 +108,21 @@ public final Collection<T> call(final ISuggestionRequest request) {
113108
}
114109
}
115110
}
116-
Collections.sort(suggestions, getComparator());
111+
suggestions.sort(getComparator());
117112
}
118113
return suggestions;
119114
}
120115

121-
122-
/***************************************************************************
123-
* *
124-
* Static methods *
125-
* *
126-
**************************************************************************/
127-
128116
/**
129117
* Get the comparator to order the suggestions
130-
* @return
131118
*/
132119
protected abstract Comparator<T> getComparator();
133120

134121
/**
135122
* Check the given possible suggestion is a match (is a valid suggestion)
136-
* @param suggestion
137-
* @param request
138-
* @return
139123
*/
140124
protected abstract boolean isMatch(T suggestion, ISuggestionRequest request);
141125

142-
143-
/***************************************************************************
144-
* *
145-
* Default implementations *
146-
* *
147-
**************************************************************************/
148-
149126
/**
150127
* This is a simple string based suggestion provider.
151128
* All generic suggestions T are turned into strings for processing.
@@ -166,18 +143,14 @@ public int compare(T o1, T o2) {
166143

167144
/**
168145
* Create a new SuggestionProviderString
169-
* @param stringConverter
170146
*/
171147
public SuggestionProviderString(Callback<T, String> stringConverter) {
172148
this.stringConverter = stringConverter;
173149

174150
// In case no stringConverter was provided, use the default strategy
175151
if (this.stringConverter == null) {
176-
this.stringConverter = new Callback<T, String>() {
177-
@Override
178-
public String call(T obj) {
179-
return obj != null ? obj.toString() : ""; //$NON-NLS-1$
180-
}
152+
this.stringConverter = obj -> {
153+
return obj != null ? obj.toString() : ""; //$NON-NLS-1$
181154
};
182155
}
183156
}

src/main/java/org/jabref/gui/collab/DatabaseChangeViewModel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public void setAccepted(boolean a) {
3131
accepted = a;
3232
}
3333

34-
3534
/**
3635
* This method returns a JComponent detailing the nature of the change.
3736
* @return JComponent

src/main/java/org/jabref/gui/customentrytypes/FieldSetComponent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ private void move(int dy) {
324324
list.setSelectedIndex(newInd);
325325
}
326326

327-
328327
/**
329328
* FocusListener to select the first entry in the list of fields when they are focused
330329
*/

src/main/java/org/jabref/gui/journals/ManageJournalAbbreviationsView.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ private void saveAbbreviationsAndCloseDialog() {
188188
close();
189189
}
190190

191-
192191
/**
193192
* This class provides a editable text field that is used as table cell.
194193
* It handles the editing of the name column.

src/main/java/org/jabref/gui/search/SearchWorker.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,21 @@
1818
import org.slf4j.Logger;
1919
import org.slf4j.LoggerFactory;
2020

21-
2221
/**
2322
* Not reusable. Always create a new instance for each search!
2423
*/
2524
class SearchWorker extends SwingWorker<List<BibEntry>, Void> {
2625

2726
private static final Logger LOGGER = LoggerFactory.getLogger(SearchWorker.class);
2827

29-
private final BasePanel basePanel;
3028
private final BibDatabase database;
3129

3230
private final SearchQuery searchQuery;
33-
private final SearchDisplayMode searchDisplayMode;
3431

3532
public SearchWorker(BasePanel basePanel, SearchQuery searchQuery, SearchDisplayMode searchDisplayMode) {
36-
this.basePanel = Objects.requireNonNull(basePanel);
3733
this.database = Objects.requireNonNull(basePanel.getDatabase());
3834
this.searchQuery = Objects.requireNonNull(searchQuery);
39-
this.searchDisplayMode = Objects.requireNonNull(searchDisplayMode);
40-
LOGGER.debug("Search (" + this.searchDisplayMode.getDisplayName() + "): " + this.searchQuery);
35+
LOGGER.debug("Search (" + searchDisplayMode.getDisplayName() + "): " + this.searchQuery);
4136
}
4237

4338
@Override

src/main/java/org/jabref/gui/util/TooltipTextUtil.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public static String textToHTMLString(Text text) {
5252
return textString;
5353
}
5454

55-
5655
/**
5756
* Formats a String to multiple Texts by replacing some parts and adding font characteristics.
5857
*/

src/main/java/org/jabref/gui/util/component/Tag.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.airhacks.afterburner.views.ViewLoader;
1515
import org.fxmisc.easybind.EasyBind;
1616

17-
1817
/**
1918
* A tag item in a {@link TagBar}.
2019
*/

src/main/java/org/jabref/logic/bibtex/DuplicateCheck.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,7 @@ public static double correlateByWords(final String s1, final String s2) {
316316
return 1 - missRate;
317317
}
318318

319-
320-
/*
319+
/**
321320
* Calculates the similarity (a number within 0 and 1) between two strings.
322321
* http://stackoverflow.com/questions/955110/similarity-string-comparison-in-java
323322
*/

src/main/java/org/jabref/logic/bst/BibtexCaseChanger.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public char asChar() {
4848
return asChar;
4949
}
5050

51-
5251
/**
5352
* Convert bstFormat char into ENUM
5453
*
@@ -72,7 +71,6 @@ private BibtexCaseChanger() {
7271
*
7372
* @param s the string to handle
7473
* @param format the format
75-
* @return
7674
*/
7775
public static String changeCase(String s, FORMAT_MODE format) {
7876
return (new BibtexCaseChanger()).doChangeCase(s, format);

0 commit comments

Comments
 (0)