asList(IEEETranEntryType.values()));
return types.stream().filter(type -> type.getName().equals(typeName.toLowerCase(Locale.ENGLISH))).findFirst().orElse(new UnknownEntryType(typeName));
}
diff --git a/src/main/java/org/jabref/model/entry/types/IEEETranEntryTypeDefinitions.java b/src/main/java/org/jabref/model/entry/types/IEEETranEntryTypeDefinitions.java
index 9c04458b92cb..694c055042b2 100644
--- a/src/main/java/org/jabref/model/entry/types/IEEETranEntryTypeDefinitions.java
+++ b/src/main/java/org/jabref/model/entry/types/IEEETranEntryTypeDefinitions.java
@@ -12,7 +12,7 @@
/**
* This class represents all supported IEEETran entry types.
*
- * @see http://ctan.sharelatex.com/tex-archive/macros/latex/contrib/IEEEtran/bibtex/IEEEtran_bst_HOWTO.pdf
+ * See http://ctan.sharelatex.com/tex-archive/macros/latex/contrib/IEEEtran/bibtex/IEEEtran_bst_HOWTO.pdf
*
* Electronic, IEEETranBSTCTL, Periodical, Patent, Standard
*/
diff --git a/src/main/java/org/jabref/model/groups/AllEntriesGroup.java b/src/main/java/org/jabref/model/groups/AllEntriesGroup.java
index fdb5b0d5fbf4..d0b92fe4760b 100644
--- a/src/main/java/org/jabref/model/groups/AllEntriesGroup.java
+++ b/src/main/java/org/jabref/model/groups/AllEntriesGroup.java
@@ -9,7 +9,6 @@
*/
public class AllEntriesGroup extends AbstractGroup {
-
public AllEntriesGroup(String name) {
super(name, GroupHierarchyType.INDEPENDENT);
}
diff --git a/src/main/java/org/jabref/model/groups/GroupTreeNode.java b/src/main/java/org/jabref/model/groups/GroupTreeNode.java
index 85795e361949..5bba190df12a 100644
--- a/src/main/java/org/jabref/model/groups/GroupTreeNode.java
+++ b/src/main/java/org/jabref/model/groups/GroupTreeNode.java
@@ -116,7 +116,7 @@ private SearchMatcher getSearchMatcher(GroupHierarchyType originalContext) {
}
} else if ((context == GroupHierarchyType.REFINING) && !isRoot() && (originalContext
!= GroupHierarchyType.INCLUDING)) {
- //noinspection OptionalGetWithoutIsPresent
+ // noinspection OptionalGetWithoutIsPresent
searchRule.addRule(getParent().get().getSearchMatcher(originalContext));
}
return searchRule;
diff --git a/src/main/java/org/jabref/model/util/FileHelper.java b/src/main/java/org/jabref/model/util/FileHelper.java
index da0ff3ee8539..dba58b1fd21d 100644
--- a/src/main/java/org/jabref/model/util/FileHelper.java
+++ b/src/main/java/org/jabref/model/util/FileHelper.java
@@ -152,7 +152,7 @@ private static Optional expandFilename(String filename, Path directory) {
Objects.requireNonNull(directory);
Path file = Paths.get(filename);
- //Explicitly check for an empty String, as File.exists returns true on that empty path, because it maps to the default jar location
+ // Explicitly check for an empty String, as File.exists returns true on that empty path, because it maps to the default jar location
// if we then call toAbsoluteDir, it would always return the jar-location folder. This is not what we want here
if (filename.isEmpty()) {
return Optional.of(directory);
diff --git a/src/main/java/org/jabref/preferences/CustomImportList.java b/src/main/java/org/jabref/preferences/CustomImportList.java
index 7aca6a3d720c..5b05e0525129 100644
--- a/src/main/java/org/jabref/preferences/CustomImportList.java
+++ b/src/main/java/org/jabref/preferences/CustomImportList.java
@@ -22,7 +22,6 @@ public class CustomImportList extends TreeSet {
private final JabRefPreferences prefs;
-
public CustomImportList(JabRefPreferences prefs) {
super();
this.prefs = prefs;
diff --git a/src/main/java/org/jabref/preferences/JabRefPreferences.java b/src/main/java/org/jabref/preferences/JabRefPreferences.java
index a98c4ae72891..9af9a2a81c11 100644
--- a/src/main/java/org/jabref/preferences/JabRefPreferences.java
+++ b/src/main/java/org/jabref/preferences/JabRefPreferences.java
@@ -293,10 +293,10 @@ public class JabRefPreferences implements PreferencesService {
public static final String CUSTOMIZED_BIBLATEX_TYPES = "customizedBiblatexTypes";
// Version
public static final String VERSION_IGNORED_UPDATE = "versionIgnoreUpdate";
- //KeyBindings - keys - public because needed for pref migration
+ // KeyBindings - keys - public because needed for pref migration
public static final String BINDINGS = "bindings";
- //AutcompleteFields - public because needed for pref migration
+ // AutcompleteFields - public because needed for pref migration
public static final String AUTOCOMPLETER_COMPLETE_FIELDS = "autoCompleteFields";
// Id Entry Generator Preferences
@@ -350,7 +350,7 @@ public class JabRefPreferences implements PreferencesService {
private static final String PROTECTED_TERMS_ENABLED_INTERNAL = "protectedTermsEnabledInternal";
private static final String PROTECTED_TERMS_DISABLED_INTERNAL = "protectedTermsDisabledInternal";
- //GroupViewMode
+ // GroupViewMode
private static final String GROUP_INTERSECT_UNION_VIEW_MODE = "groupIntersectUnionViewModes";
// Dialog states
@@ -626,7 +626,7 @@ private JabRefPreferences() {
// use BibTeX key appended with filename as default pattern
defaults.put(IMPORT_FILENAMEPATTERN, ImportTabViewModel.DEFAULT_FILENAME_PATTERNS[1]);
- //Default empty String to be backwards compatible
+ // Default empty String to be backwards compatible
defaults.put(IMPORT_FILEDIRPATTERN, "");
customImports = new CustomImportList(this);
@@ -648,7 +648,7 @@ private JabRefPreferences() {
defaults.put(FILE_BROWSER_COMMAND, "");
}
- //versioncheck defaults
+ // versioncheck defaults
defaults.put(VERSION_IGNORED_UPDATE, "");
// preview
@@ -829,7 +829,7 @@ public Map getCustomTabsNamesAndFields() {
int defNumber = 0;
while (true) {
- //Saved as CUSTOMTABNAME_def{number} and ; separated
+ // Saved as CUSTOMTABNAME_def{number} and ; separated
String name = (String) defaults.get(CUSTOM_TAB_NAME + "_def" + defNumber);
String fields = (String) defaults.get(CUSTOM_TAB_FIELDS + "_def" + defNumber);
diff --git a/src/test/java/org/jabref/gui/externalfiles/AutoSetFileLinksUtilTest.java b/src/test/java/org/jabref/gui/externalfiles/AutoSetFileLinksUtilTest.java
index 04050a9bd209..1bcd38953380 100644
--- a/src/test/java/org/jabref/gui/externalfiles/AutoSetFileLinksUtilTest.java
+++ b/src/test/java/org/jabref/gui/externalfiles/AutoSetFileLinksUtilTest.java
@@ -42,7 +42,7 @@ public void setUp(@TempDir Path folder) throws Exception {
@Test
public void test() throws Exception {
- //Due to mocking the externalFileType class, the file extension will not be found
+ // Due to mocking the externalFileType class, the file extension will not be found
List expected = Collections.singletonList(new LinkedFile("", "CiteKey.pdf", ""));
diff --git a/src/test/java/org/jabref/gui/fieldeditors/LinkedFileViewModelTest.java b/src/test/java/org/jabref/gui/fieldeditors/LinkedFileViewModelTest.java
index 86ab685cc8cb..bac8b1122738 100644
--- a/src/test/java/org/jabref/gui/fieldeditors/LinkedFileViewModelTest.java
+++ b/src/test/java/org/jabref/gui/fieldeditors/LinkedFileViewModelTest.java
@@ -157,7 +157,7 @@ void downloadDoesNotOverwriteFileTypeExtension() throws MalformedURLException {
linkedFile = new LinkedFile(new URL("http://arxiv.org/pdf/1207.0408v1"), "");
databaseContext = mock(BibDatabaseContext.class);
- when(filePreferences.getFileNamePattern()).thenReturn("[bibtexkey]"); //use this variant, as we cannot mock the linkedFileHandler cause it's initialized inside the viewModel
+ when(filePreferences.getFileNamePattern()).thenReturn("[bibtexkey]"); // use this variant, as we cannot mock the linkedFileHandler cause it's initialized inside the viewModel
LinkedFileViewModel viewModel = new LinkedFileViewModel(linkedFile, entry, databaseContext, new CurrentThreadTaskExecutor(), dialogService, xmpPreferences, filePreferences, externalFileType);
diff --git a/src/test/java/org/jabref/logic/bibtex/BibEntryWriterTest.java b/src/test/java/org/jabref/logic/bibtex/BibEntryWriterTest.java
index 19411d8254c1..5ebca3902d5d 100644
--- a/src/test/java/org/jabref/logic/bibtex/BibEntryWriterTest.java
+++ b/src/test/java/org/jabref/logic/bibtex/BibEntryWriterTest.java
@@ -48,10 +48,10 @@ void testSerialization() throws IOException {
StringWriter stringWriter = new StringWriter();
BibEntry entry = new BibEntry(StandardEntryType.Article);
- //set a required field
+ // set a required field
entry.setField(StandardField.AUTHOR, "Foo Bar");
entry.setField(StandardField.JOURNAL, "International Journal of Something");
- //set an optional field
+ // set an optional field
entry.setField(StandardField.NUMBER, "1");
entry.setField(StandardField.NOTE, "some note");
@@ -81,7 +81,7 @@ void writeOtherTypeTest() throws Exception {
entry.setField(StandardField.COMMENT, "testentry");
entry.setCiteKey("test");
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -111,10 +111,10 @@ void writeEntryWithOrField() throws Exception {
StringWriter stringWriter = new StringWriter();
BibEntry entry = new BibEntry(StandardEntryType.InBook);
- //set an required OR field (author/editor)
+ // set an required OR field (author/editor)
entry.setField(StandardField.EDITOR, "Foo Bar");
entry.setField(StandardField.JOURNAL, "International Journal of Something");
- //set an optional field
+ // set an optional field
entry.setField(StandardField.NUMBER, "1");
entry.setField(StandardField.NOTE, "some note");
@@ -139,11 +139,11 @@ void writeEntryWithOrFieldBothFieldsPresent() throws Exception {
StringWriter stringWriter = new StringWriter();
BibEntry entry = new BibEntry(StandardEntryType.InBook);
- //set an required OR field with both fields(author/editor)
+ // set an required OR field with both fields(author/editor)
entry.setField(StandardField.AUTHOR, "Foo Thor");
entry.setField(StandardField.EDITOR, "Edi Bar");
entry.setField(StandardField.JOURNAL, "International Journal of Something");
- //set an optional field
+ // set an optional field
entry.setField(StandardField.NUMBER, "1");
entry.setField(StandardField.NOTE, "some note");
@@ -199,7 +199,7 @@ void roundTripTest() throws IOException {
Collection entries = result.getDatabase().getEntries();
BibEntry entry = entries.iterator().next();
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -223,7 +223,7 @@ void roundTripWithPrependingNewlines() throws IOException {
Collection entries = result.getDatabase().getEntries();
BibEntry entry = entries.iterator().next();
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -286,7 +286,7 @@ void roundTripWithCamelCasingInTheOriginalEntryAndResultInLowerCase() throws IOE
// modify entry
entry.setField(StandardField.AUTHOR, "BlaBla");
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -323,7 +323,7 @@ void testEntryTypeChange() throws IOException {
// modify entry
entry.setType(StandardEntryType.InProceedings);
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -356,7 +356,7 @@ void roundTripWithAppendedNewlines() throws IOException {
Collection entries = result.getDatabase().getEntries();
BibEntry entry = entries.iterator().next();
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -389,7 +389,7 @@ private String testSingleWrite(String bibtexEntry) throws IOException {
Collection entries = result.getDatabase().getEntries();
BibEntry entry = entries.iterator().next();
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -418,7 +418,7 @@ void monthFieldSpecialSyntax() throws IOException {
assertTrue(fields.contains(StandardField.MONTH));
assertEquals("#mar#", entry.getField(StandardField.MONTH).get());
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -479,7 +479,7 @@ void addFieldWithLongerLength() throws IOException {
// modify entry
entry.setField(StandardField.HOWPUBLISHED, "asdf");
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -542,7 +542,7 @@ void roundTripWithPrecedingCommentTest() throws IOException {
Collection entries = result.getDatabase().getEntries();
BibEntry entry = entries.iterator().next();
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -570,7 +570,7 @@ void roundTripWithPrecedingCommentAndModificationTest() throws IOException {
// change the entry
entry.setField(StandardField.AUTHOR, "John Doe");
- //write out bibtex string
+ // write out bibtex string
StringWriter stringWriter = new StringWriter();
writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX);
String actual = stringWriter.toString();
@@ -592,15 +592,15 @@ void alphabeticSerialization() throws IOException {
StringWriter stringWriter = new StringWriter();
BibEntry entry = new BibEntry(StandardEntryType.Article);
- //required fields
+ // required fields
entry.setField(StandardField.AUTHOR, "Foo Bar");
entry.setField(StandardField.JOURNALTITLE, "International Journal of Something");
entry.setField(StandardField.TITLE, "Title");
entry.setField(StandardField.DATE, "2019-10-16");
- //optional fields
+ // optional fields
entry.setField(StandardField.NUMBER, "1");
entry.setField(StandardField.NOTE, "some note");
- //unknown fields
+ // unknown fields
entry.setField(StandardField.YEAR, "2019");
entry.setField(StandardField.CHAPTER, "chapter");
diff --git a/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java b/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java
index 7cdf6d2dc563..75cb1c30d2aa 100644
--- a/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java
+++ b/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java
@@ -63,7 +63,7 @@ void setUp(@TempDir Path bibFolder) throws IOException {
context.setDatabasePath(bibFolder.resolve("test.bib"));
FilePreferences fileDirPrefs = mock(FilePreferences.class, Answers.RETURNS_SMART_NULLS);
- //Biblocation as Primary overwrites all other dirs
+ // Biblocation as Primary overwrites all other dirs
when(fileDirPrefs.isBibLocationAsPrimary()).thenReturn(true);
worker = new CleanupWorker(context,
diff --git a/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java b/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java
index 523dfb5a049c..22ef8bd86e70 100644
--- a/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java
+++ b/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java
@@ -59,7 +59,7 @@ void setUp(@TempDir Path bibFolder) throws IOException {
entry.setField(StandardField.FILE, FileFieldWriter.getStringRepresentation(fileField));
filePreferences = mock(FilePreferences.class);
- when(filePreferences.isBibLocationAsPrimary()).thenReturn(false); //Biblocation as Primary overwrites all other dirs, therefore we set it to false here
+ when(filePreferences.isBibLocationAsPrimary()).thenReturn(false); // Biblocation as Primary overwrites all other dirs, therefore we set it to false here
cleanup = new MoveFilesCleanup(databaseContext, filePreferences);
}
diff --git a/src/test/java/org/jabref/logic/cleanup/RenamePdfCleanupTest.java b/src/test/java/org/jabref/logic/cleanup/RenamePdfCleanupTest.java
index d60b82a72c3e..89393473737b 100644
--- a/src/test/java/org/jabref/logic/cleanup/RenamePdfCleanupTest.java
+++ b/src/test/java/org/jabref/logic/cleanup/RenamePdfCleanupTest.java
@@ -41,7 +41,7 @@ void setUp(@TempDir Path testFolder) {
entry.setCiteKey("Toot");
filePreferences = mock(FilePreferences.class);
- when(filePreferences.isBibLocationAsPrimary()).thenReturn(true); //Set Biblocation as Primary Directory, otherwise the tmp folders won't be cleaned up correctly
+ when(filePreferences.isBibLocationAsPrimary()).thenReturn(true); // Set Biblocation as Primary Directory, otherwise the tmp folders won't be cleaned up correctly
cleanup = new RenamePdfCleanup(false, context, filePreferences);
}
diff --git a/src/test/java/org/jabref/logic/exporter/XmpExporterTest.java b/src/test/java/org/jabref/logic/exporter/XmpExporterTest.java
index 3f14e69d66ba..d102c01aa390 100644
--- a/src/test/java/org/jabref/logic/exporter/XmpExporterTest.java
+++ b/src/test/java/org/jabref/logic/exporter/XmpExporterTest.java
@@ -46,7 +46,7 @@ public void exportSingleEntry(@TempDir Path testFolder) throws Exception {
entry.setField(StandardField.AUTHOR, "Alan Turing");
exporter.export(databaseContext, file, encoding, Collections.singletonList(entry));
- String actual = String.join("\n", Files.readAllLines(file)); //we are using \n to join, so we need it in the expected string as well, \r\n would fail
+ String actual = String.join("\n", Files.readAllLines(file)); // we are using \n to join, so we need it in the expected string as well, \r\n would fail
String expected = " \n" +
" \n" +
" \n" +
@@ -79,7 +79,7 @@ public void writeMultipleEntriesInASingleFile(@TempDir Path testFolder) throws E
exporter.export(databaseContext, file, encoding, Arrays.asList(entryTuring, entryArmbrust));
- String actual = String.join("\n", Files.readAllLines(file)); //we are using \n to join, so we need it in the expected string as well, \r\n would fail
+ String actual = String.join("\n", Files.readAllLines(file)); // we are using \n to join, so we need it in the expected string as well, \r\n would fail
String expected = " \n" +
" \n" +
@@ -135,7 +135,7 @@ public void writeMultipleEntriesInDifferentFiles(@TempDir Path testFolder) throw
assertEquals(Collections.emptyList(), lines);
Path fileTuring = Paths.get(file.getParent().toString() + "/" + entryTuring.getId() + "_null.xmp");
- String actualTuring = String.join("\n", Files.readAllLines(fileTuring)); //we are using \n to join, so we need it in the expected string as well, \r\n would fail
+ String actualTuring = String.join("\n", Files.readAllLines(fileTuring)); // we are using \n to join, so we need it in the expected string as well, \r\n would fail
String expectedTuring = " \n" +
" \n" +
@@ -156,7 +156,7 @@ public void writeMultipleEntriesInDifferentFiles(@TempDir Path testFolder) throw
assertEquals(expectedTuring, actualTuring);
Path fileArmbrust = Paths.get(file.getParent().toString() + "/" + entryArmbrust.getId() + "_Armbrust2010.xmp");
- String actualArmbrust = String.join("\n", Files.readAllLines(fileArmbrust)); //we are using \n to join, so we need it in the expected string as well, \r\n would fail
+ String actualArmbrust = String.join("\n", Files.readAllLines(fileArmbrust)); // we are using \n to join, so we need it in the expected string as well, \r\n would fail
String expectedArmbrust = " \n" +
" \n" +
diff --git a/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java b/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java
index 4925966752c1..22ad681f0ef0 100644
--- a/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java
+++ b/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java
@@ -159,7 +159,7 @@ public void searchByEntryFindsEntry() throws Exception {
@Test
public void testPerformSearchByFamaeyMcGaughEntry() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("10.12942/lrr-2012-10");
- fetchedEntry.ifPresent(entry -> entry.clearField(StandardField.ABSTRACT));//Remove abstract due to copyright
+ fetchedEntry.ifPresent(entry -> entry.clearField(StandardField.ABSTRACT));// Remove abstract due to copyright
assertEquals(Optional.of(famaeyMcGaughEntry), fetchedEntry);
}
@@ -177,7 +177,7 @@ public void testPerformSearchByIdInvalidDoi() throws Exception {
@Test
public void testPerformSearchBySunWelchEntry() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("10.1038/nmat3160");
- fetchedEntry.ifPresent(entry -> entry.clearField(StandardField.ABSTRACT)); //Remove abstract due to copyright
+ fetchedEntry.ifPresent(entry -> entry.clearField(StandardField.ABSTRACT)); // Remove abstract due to copyright
assertEquals(Optional.of(sunWelchEntry), fetchedEntry);
}
diff --git a/src/test/java/org/jabref/logic/importer/fetcher/IEEETest.java b/src/test/java/org/jabref/logic/importer/fetcher/IEEETest.java
index b2a45b5fa42b..c5ac3f885d0d 100644
--- a/src/test/java/org/jabref/logic/importer/fetcher/IEEETest.java
+++ b/src/test/java/org/jabref/logic/importer/fetcher/IEEETest.java
@@ -108,8 +108,8 @@ void searchResultHasNoKeywordTerms() throws FetcherException {
expected.setField(StandardField.TITLE, "Optimal operation of PV-DG-battery based microgrid with power quality conditioner");
expected.setField(StandardField.VOLUME, "13");
- List fetchedEntries = fetcher.performSearch("8636659"); //article number
- fetchedEntries.forEach(entry -> entry.clearField(StandardField.ABSTRACT)); //Remove abstract due to copyright);
+ List fetchedEntries = fetcher.performSearch("8636659"); // article number
+ fetchedEntries.forEach(entry -> entry.clearField(StandardField.ABSTRACT)); // Remove abstract due to copyright);
assertEquals(Collections.singletonList(expected), fetchedEntries);
}
diff --git a/src/test/java/org/jabref/logic/importer/fetcher/MedlineFetcherTest.java b/src/test/java/org/jabref/logic/importer/fetcher/MedlineFetcherTest.java
index 7ad94a2bfeae..ada1b137b351 100644
--- a/src/test/java/org/jabref/logic/importer/fetcher/MedlineFetcherTest.java
+++ b/src/test/java/org/jabref/logic/importer/fetcher/MedlineFetcherTest.java
@@ -139,35 +139,35 @@ public void testGetHelpPage() {
@Test
public void testSearchByIDWijedasa() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("27670948");
- fetchedEntry.get().clearField(StandardField.ABSTRACT); //Remove abstract due to copyright
+ fetchedEntry.get().clearField(StandardField.ABSTRACT); // Remove abstract due to copyright
assertEquals(Optional.of(entryWijedasa), fetchedEntry);
}
@Test
public void testSearchByIDEndharti() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("27670445");
- fetchedEntry.get().clearField(StandardField.ABSTRACT); //Remove abstract due to copyright
+ fetchedEntry.get().clearField(StandardField.ABSTRACT); // Remove abstract due to copyright
assertEquals(Optional.of(entryEndharti), fetchedEntry);
}
@Test
public void testSearchByIDIchikawa() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("26197440");
- fetchedEntry.get().clearField(StandardField.ABSTRACT); //Remove abstract due to copyright
+ fetchedEntry.get().clearField(StandardField.ABSTRACT); // Remove abstract due to copyright
assertEquals(Optional.of(bibEntryIchikawa), fetchedEntry);
}
@Test
public void testSearchByIDSari() throws Exception {
Optional fetchedEntry = fetcher.performSearchById("26867355");
- fetchedEntry.get().clearField(StandardField.ABSTRACT); //Remove abstract due to copyright
+ fetchedEntry.get().clearField(StandardField.ABSTRACT); // Remove abstract due to copyright
assertEquals(Optional.of(bibEntrySari), fetchedEntry);
}
@Test
public void testMultipleEntries() throws Exception {
List entryList = fetcher.performSearch("java");
- entryList.forEach(entry -> entry.clearField(StandardField.ABSTRACT)); //Remove abstract due to copyright);
+ entryList.forEach(entry -> entry.clearField(StandardField.ABSTRACT)); // Remove abstract due to copyright);
assertEquals(50, entryList.size());
assertTrue(entryList.contains(bibEntryIchikawa));
}
diff --git a/src/test/java/org/jabref/logic/importer/fileformat/CustomImporterTest.java b/src/test/java/org/jabref/logic/importer/fileformat/CustomImporterTest.java
index 23cc0b39912a..529d770234eb 100644
--- a/src/test/java/org/jabref/logic/importer/fileformat/CustomImporterTest.java
+++ b/src/test/java/org/jabref/logic/importer/fileformat/CustomImporterTest.java
@@ -54,7 +54,7 @@ public void equalsWithSameReference() {
@Test
public void equalsIsBasedOnName() {
- //noinspection AssertEqualsBetweenInconvertibleTypes
+ // noinspection AssertEqualsBetweenInconvertibleTypes
assertEquals(new CopacImporter(), importer);
}
diff --git a/src/test/java/org/jabref/logic/importer/util/GroupsParserTest.java b/src/test/java/org/jabref/logic/importer/util/GroupsParserTest.java
index 9b18f96b970c..07ca10e22348 100644
--- a/src/test/java/org/jabref/logic/importer/util/GroupsParserTest.java
+++ b/src/test/java/org/jabref/logic/importer/util/GroupsParserTest.java
@@ -71,7 +71,7 @@ void testImportSubGroups() throws Exception {
List orderedData = Arrays.asList("0 AllEntriesGroup:", "1 ExplicitGroup:1;0;",
"2 ExplicitGroup:2;0;", "0 ExplicitGroup:3;0;");
- //Create group hierarchy:
+ // Create group hierarchy:
// Level 0 Name: All entries
// Level 1 Name: 1
// Level 2 Name: 2
diff --git a/src/test/java/org/jabref/logic/l10n/LanguageTest.java b/src/test/java/org/jabref/logic/l10n/LanguageTest.java
index 8b583357db92..d821d8925482 100644
--- a/src/test/java/org/jabref/logic/l10n/LanguageTest.java
+++ b/src/test/java/org/jabref/logic/l10n/LanguageTest.java
@@ -17,7 +17,7 @@ void convertKnownLanguageOnly() {
@Test
void convertKnownLanguageAndCountryCorrect() {
- //Language and country code have to be separated see: https://stackoverflow.com/a/3318598
+ // Language and country code have to be separated see: https://stackoverflow.com/a/3318598
assertEquals(Optional.of(new Locale("pt", "BR")), Language.convertToSupportedLocale(Language.BRAZILIAN_PORTUGUESE));
}
diff --git a/src/test/java/org/jabref/logic/openoffice/StyleLoaderTest.java b/src/test/java/org/jabref/logic/openoffice/StyleLoaderTest.java
index 5ac0ec152a92..e83ace4d707d 100644
--- a/src/test/java/org/jabref/logic/openoffice/StyleLoaderTest.java
+++ b/src/test/java/org/jabref/logic/openoffice/StyleLoaderTest.java
@@ -135,7 +135,7 @@ public void testInitalizeWithOneExternalFileRemoveStyleUpdatesPreferences() thro
for (OOBibStyle style : toremove) {
assertTrue(loader.removeStyle(style));
}
- //As the prefs are mocked away, the getExternalStyles still returns the initial one
+ // As the prefs are mocked away, the getExternalStyles still returns the initial one
assertFalse(preferences.getExternalStyles().isEmpty());
}
diff --git a/src/test/java/org/jabref/logic/pdf/EntryAnnotationImporterTest.java b/src/test/java/org/jabref/logic/pdf/EntryAnnotationImporterTest.java
index 9230dcc16a7f..4f2754d9359f 100644
--- a/src/test/java/org/jabref/logic/pdf/EntryAnnotationImporterTest.java
+++ b/src/test/java/org/jabref/logic/pdf/EntryAnnotationImporterTest.java
@@ -33,14 +33,14 @@ public void setUp() {
@Test
public void readEntryExampleThesis() {
- //given
+ // given
entry.setField(StandardField.FILE, ":thesis-example.pdf:PDF");
EntryAnnotationImporter entryAnnotationImporter = new EntryAnnotationImporter(entry);
- //when
+ // when
Map> annotations = entryAnnotationImporter.importAnnotationsFromFiles(databaseContext, mock(FilePreferences.class));
- //then
+ // then
int fileCounter = 0;
int annotationCounter = 0;
for (List annotationsOfFile : annotations.values()) {
diff --git a/src/test/java/org/jabref/logic/search/SearchQueryTest.java b/src/test/java/org/jabref/logic/search/SearchQueryTest.java
index e8630135ed7c..2be23fd98f47 100644
--- a/src/test/java/org/jabref/logic/search/SearchQueryTest.java
+++ b/src/test/java/org/jabref/logic/search/SearchQueryTest.java
@@ -200,7 +200,7 @@ public void testGetPattern() {
String query = "progress";
SearchQuery result = new SearchQuery(query, false, false);
Pattern pattern = Pattern.compile("(\\Qprogress\\E)");
- //We can't directly compare the pattern objects
+ // We can't directly compare the pattern objects
assertEquals(Optional.of(pattern.toString()), result.getPatternForWords().map(Pattern::toString));
}
@@ -222,7 +222,7 @@ public void testGetRegexpJavascriptPattern() {
@Test
public void testEscapingInPattern() {
- //first word contain all java special regex characters
+ // first word contain all java special regex characters
String queryText = "<([{\\\\^-=$!|]})?*+.> word1 word2.";
SearchQuery textQueryWithSpecialChars = new SearchQuery(queryText, false, false);
String pattern = "(\\Q<([{\\^-=$!|]})?*+.>\\E)|(\\Qword1\\E)|(\\Qword2.\\E)";
@@ -231,7 +231,7 @@ public void testEscapingInPattern() {
@Test
public void testEscapingInJavascriptPattern() {
- //first word contain all javascript special regex characters that should be escaped individually in text based search
+ // first word contain all javascript special regex characters that should be escaped individually in text based search
String queryText = "([{\\\\^$|]})?*+./ word1 word2.";
SearchQuery textQueryWithSpecialChars = new SearchQuery(queryText, false, false);
String pattern = "(\\(\\[\\{\\\\\\^\\$\\|\\]\\}\\)\\?\\*\\+\\.\\/)|(word1)|(word2\\.)";
diff --git a/src/test/java/org/jabref/logic/shared/DBMSProcessorTest.java b/src/test/java/org/jabref/logic/shared/DBMSProcessorTest.java
index fe7c59b4263b..653f0a11f3e6 100644
--- a/src/test/java/org/jabref/logic/shared/DBMSProcessorTest.java
+++ b/src/test/java/org/jabref/logic/shared/DBMSProcessorTest.java
@@ -190,7 +190,7 @@ void testUpdateNewerEntry() {
dbmsProcessor.insertEntry(bibEntry);
- //simulate older version
+ // simulate older version
bibEntry.getSharedBibEntryData().setVersion(0);
bibEntry.setField(StandardField.YEAR, "1993");
@@ -202,7 +202,7 @@ void testUpdateEqualEntry() throws OfflineLockException, SQLException {
BibEntry expectedBibEntry = getBibEntryExample();
dbmsProcessor.insertEntry(expectedBibEntry);
- //simulate older version
+ // simulate older version
expectedBibEntry.getSharedBibEntryData().setVersion(0);
dbmsProcessor.updateEntry(expectedBibEntry);
diff --git a/src/test/java/org/jabref/logic/shared/SynchronizationTestSimulator.java b/src/test/java/org/jabref/logic/shared/SynchronizationTestSimulator.java
index 934b8762ed8e..dac5e0f92d58 100644
--- a/src/test/java/org/jabref/logic/shared/SynchronizationTestSimulator.java
+++ b/src/test/java/org/jabref/logic/shared/SynchronizationTestSimulator.java
@@ -69,11 +69,11 @@ public void clear() throws SQLException {
@Test
public void simulateEntryInsertionAndManualPull() throws Exception {
- //client A inserts an entry
+ // client A inserts an entry
clientContextA.getDatabase().insertEntry(getBibEntryExample(1));
- //client A inserts another entry
+ // client A inserts another entry
clientContextA.getDatabase().insertEntry(getBibEntryExample(2));
- //client B pulls the changes
+ // client B pulls the changes
clientContextB.getDBMSSynchronizer().pullChanges();
assertEquals(clientContextA.getDatabase().getEntries(), clientContextB.getDatabase().getEntries());
@@ -97,18 +97,18 @@ public void simulateEntryUpdateAndManualPull() throws Exception {
@Test
public void simulateEntryDelitionAndManualPull() throws Exception {
BibEntry bibEntry = getBibEntryExample(1);
- //client A inserts an entry
+ // client A inserts an entry
clientContextA.getDatabase().insertEntry(bibEntry);
- //client B pulls the entry
+ // client B pulls the entry
clientContextB.getDBMSSynchronizer().pullChanges();
assertFalse(clientContextA.getDatabase().getEntries().isEmpty());
assertFalse(clientContextB.getDatabase().getEntries().isEmpty());
assertEquals(clientContextA.getDatabase().getEntries(), clientContextB.getDatabase().getEntries());
- //client A removes the entry
+ // client A removes the entry
clientContextA.getDatabase().removeEntry(bibEntry);
- //client B pulls the change
+ // client B pulls the change
clientContextB.getDBMSSynchronizer().pullChanges();
assertTrue(clientContextA.getDatabase().getEntries().isEmpty());
@@ -118,21 +118,21 @@ public void simulateEntryDelitionAndManualPull() throws Exception {
@Test
public void simulateUpdateOnNoLongerExistingEntry() throws Exception {
BibEntry bibEntryOfClientA = getBibEntryExample(1);
- //client A inserts an entry
+ // client A inserts an entry
clientContextA.getDatabase().insertEntry(bibEntryOfClientA);
- //client B pulls the entry
+ // client B pulls the entry
clientContextB.getDBMSSynchronizer().pullChanges();
assertFalse(clientContextA.getDatabase().getEntries().isEmpty());
assertFalse(clientContextB.getDatabase().getEntries().isEmpty());
assertEquals(clientContextA.getDatabase().getEntries(), clientContextB.getDatabase().getEntries());
- //client A removes the entry
+ // client A removes the entry
clientContextA.getDatabase().removeEntry(bibEntryOfClientA);
assertFalse(clientContextB.getDatabase().getEntries().isEmpty());
assertNull(eventListenerB.getSharedEntriesNotPresentEvent());
- //client B tries to update the entry
+ // client B tries to update the entry
BibEntry bibEntryOfClientB = clientContextB.getDatabase().getEntries().get(0);
bibEntryOfClientB.setField(StandardField.YEAR, "2009");
diff --git a/src/test/java/org/jabref/logic/util/JavaVersionTest.java b/src/test/java/org/jabref/logic/util/JavaVersionTest.java
index 443b404f803d..662549e43646 100644
--- a/src/test/java/org/jabref/logic/util/JavaVersionTest.java
+++ b/src/test/java/org/jabref/logic/util/JavaVersionTest.java
@@ -20,12 +20,12 @@ public class JavaVersionTest {
java.add("1.6.0_10"); // Oracle
java.add("1.6.0_45"); // Oracle
java.add("1.7.0_13"); // Oracle
- java.add("1.8.0_76-release"); //openjdk
- java.add("1.8.0_92"); //Oracle
- java.add("1.8.0_111"); //Oracle
- java.add("1.8.0_112-release"); //openjdk
- java.add("1.8.0_152-release"); //openjdk
- java.add("1.8.0_144"); //Oracle
+ java.add("1.8.0_76-release"); // openjdk
+ java.add("1.8.0_92"); // Oracle
+ java.add("1.8.0_111"); // Oracle
+ java.add("1.8.0_112-release"); // openjdk
+ java.add("1.8.0_152-release"); // openjdk
+ java.add("1.8.0_144"); // Oracle
// Examples http://openjdk.java.net/jeps/223
// Note that it might be possible that java 9 versions are either 9.1.4+8 or new style 1.9.0_31-b08
diff --git a/src/test/java/org/jabref/logic/util/io/RegExpBasedFileFinderTests.java b/src/test/java/org/jabref/logic/util/io/RegExpBasedFileFinderTests.java
index 8110322183c6..b1a2ff97ae70 100644
--- a/src/test/java/org/jabref/logic/util/io/RegExpBasedFileFinderTests.java
+++ b/src/test/java/org/jabref/logic/util/io/RegExpBasedFileFinderTests.java
@@ -46,7 +46,7 @@ public void setUp() {
@Test
public void testFindFiles() throws Exception {
- //given
+ // given
BibEntry localEntry = new BibEntry(StandardEntryType.Article);
localEntry.setCiteKey("pdfInDatabase");
localEntry.setField(StandardField.YEAR, "2001");
@@ -56,33 +56,33 @@ public void testFindFiles() throws Exception {
List dirs = Collections.singletonList(Paths.get(FILES_DIRECTORY));
RegExpBasedFileFinder fileFinder = new RegExpBasedFileFinder("**/[bibtexkey].*\\\\.[extension]", ',');
- //when
+ // when
List result = fileFinder.findAssociatedFiles(localEntry, dirs, extensions);
- //then
+ // then
assertEquals(Collections.singletonList(Paths.get("src/test/resources/org/jabref/logic/importer/unlinkedFilesTestFolder/pdfInDatabase.pdf")),
result);
}
@Test
public void testYearAuthFirspageFindFiles() throws Exception {
- //given
+ // given
List extensions = Collections.singletonList("pdf");
List dirs = Collections.singletonList(Paths.get(FILES_DIRECTORY));
RegExpBasedFileFinder fileFinder = new RegExpBasedFileFinder("**/[year]_[auth]_[firstpage].*\\\\.[extension]", ',');
- //when
+ // when
List result = fileFinder.findAssociatedFiles(entry, dirs, extensions);
- //then
+ // then
assertEquals(Collections.singletonList(Paths.get("src/test/resources/org/jabref/logic/importer/unlinkedFilesTestFolder/directory/subdirectory/2003_Hippel_209.pdf")),
result);
}
@Test
public void testAuthorWithDiacritics() throws Exception {
- //given
+ // given
BibEntry localEntry = new BibEntry(StandardEntryType.Article);
localEntry.setCiteKey("Grazulis2017");
localEntry.setField(StandardField.YEAR, "2017");
@@ -94,17 +94,17 @@ public void testAuthorWithDiacritics() throws Exception {
List dirs = Collections.singletonList(Paths.get(FILES_DIRECTORY));
RegExpBasedFileFinder fileFinder = new RegExpBasedFileFinder("**/[year]_[auth]_[firstpage]\\\\.[extension]", ',');
- //when
+ // when
List result = fileFinder.findAssociatedFiles(localEntry, dirs, extensions);
- //then
+ // then
assertEquals(Collections.singletonList(Paths.get("src/test/resources/org/jabref/logic/importer/unlinkedFilesTestFolder/directory/subdirectory/2017_Gražulis_726.pdf")),
result);
}
@Test
public void testFindFileInSubdirectory() throws Exception {
- //given
+ // given
BibEntry localEntry = new BibEntry(StandardEntryType.Article);
localEntry.setCiteKey("pdfInSubdirectory");
localEntry.setField(StandardField.YEAR, "2017");
@@ -114,17 +114,17 @@ public void testFindFileInSubdirectory() throws Exception {
List dirs = Collections.singletonList(Paths.get(FILES_DIRECTORY));
RegExpBasedFileFinder fileFinder = new RegExpBasedFileFinder("**/[bibtexkey].*\\\\.[extension]", ',');
- //when
+ // when
List result = fileFinder.findAssociatedFiles(localEntry, dirs, extensions);
- //then
+ // then
assertEquals(Collections.singletonList(Paths.get("src/test/resources/org/jabref/logic/importer/unlinkedFilesTestFolder/directory/subdirectory/pdfInSubdirectory.pdf")),
result);
}
@Test
public void testFindFileNonRecursive() throws Exception {
- //given
+ // given
BibEntry localEntry = new BibEntry(StandardEntryType.Article);
localEntry.setCiteKey("pdfInSubdirectory");
localEntry.setField(StandardField.YEAR, "2017");
@@ -134,10 +134,10 @@ public void testFindFileNonRecursive() throws Exception {
List dirs = Collections.singletonList(Paths.get(FILES_DIRECTORY));
RegExpBasedFileFinder fileFinder = new RegExpBasedFileFinder("*/[bibtexkey].*\\\\.[extension]", ',');
- //when
+ // when
List result = fileFinder.findAssociatedFiles(localEntry, dirs, extensions);
- //then
+ // then
assertTrue(result.isEmpty());
}
diff --git a/src/test/java/org/jabref/model/entry/AuthorListParameterTest.java b/src/test/java/org/jabref/model/entry/AuthorListParameterTest.java
index 47adb50271d0..4947265355bc 100644
--- a/src/test/java/org/jabref/model/entry/AuthorListParameterTest.java
+++ b/src/test/java/org/jabref/model/entry/AuthorListParameterTest.java
@@ -15,8 +15,8 @@ private static Stream data() {
Arguments.of("王, 军", new Author("军", "军.", null, "王", null)),
Arguments.of("Doe, John", new Author("John", "J.", null, "Doe", null)),
Arguments.of("von Berlichingen zu Hornberg, Johann Gottfried", new Author("Johann Gottfried", "J. G.", "von", "Berlichingen zu Hornberg", null)),
- //Arguments.of("Robert and Sons, Inc.", new Author(null, null, null, "Robert and Sons, Inc.", null))),
- //Arguments.of("al-Ṣāliḥ, Abdallāh", new Author("Abdallāh", "A.", null, "al-Ṣāliḥ", null))),
+ // Arguments.of("Robert and Sons, Inc.", new Author(null, null, null, "Robert and Sons, Inc.", null))),
+ // Arguments.of("al-Ṣāliḥ, Abdallāh", new Author("Abdallāh", "A.", null, "al-Ṣāliḥ", null))),
Arguments.of("de la Vallée Poussin, Jean Charles Gabriel", new Author("Jean Charles Gabriel", "J. C. G.", "de la", "Vallée Poussin", null)),
Arguments.of("de la Vallée Poussin, J. C. G.", new Author("J. C. G.", "J. C. G.", "de la", "Vallée Poussin", null)),
Arguments.of("{K}ent-{B}oswell, E. S.", new Author("E. S.", "E. S.", null, "{K}ent-{B}oswell", null)),
diff --git a/src/test/java/org/jabref/model/entry/AuthorListTest.java b/src/test/java/org/jabref/model/entry/AuthorListTest.java
index 0916af571f03..77bb79b5b7d8 100644
--- a/src/test/java/org/jabref/model/entry/AuthorListTest.java
+++ b/src/test/java/org/jabref/model/entry/AuthorListTest.java
@@ -606,7 +606,7 @@ public void createCorrectInitials() {
@Test
public void parseNameWithBracesAroundFirstName() throws Exception {
- //TODO: Be more intelligent and abbreviate the first name correctly
+ // TODO: Be more intelligent and abbreviate the first name correctly
Author expected = new Author("Tse-tung", "{Tse-tung}.", null, "Mao", null);
assertEquals(new AuthorList(expected), AuthorList.parse("{Tse-tung} Mao"));
}
diff --git a/src/test/java/org/jabref/testutils/category/FetcherTest.java b/src/test/java/org/jabref/testutils/category/FetcherTest.java
index 5e833e1ca48e..3bcbbcc84e90 100644
--- a/src/test/java/org/jabref/testutils/category/FetcherTest.java
+++ b/src/test/java/org/jabref/testutils/category/FetcherTest.java
@@ -13,5 +13,5 @@
@Inherited
@Tag("FetcherTest")
public @interface FetcherTest {
- //empty
+ // empty
}
diff --git a/src/test/java/org/jabref/testutils/category/GUITest.java b/src/test/java/org/jabref/testutils/category/GUITest.java
index c166c80a3284..8add1b3eda8d 100644
--- a/src/test/java/org/jabref/testutils/category/GUITest.java
+++ b/src/test/java/org/jabref/testutils/category/GUITest.java
@@ -13,5 +13,5 @@
@Inherited
@Tag("GUITest")
public @interface GUITest {
- //empty
+ // empty
}