diff --git a/src/jmh/java/net/sf/jabref/benchmarks/Benchmarks.java b/src/jmh/java/net/sf/jabref/benchmarks/Benchmarks.java index 59bf3e6758d..2748fe43169 100644 --- a/src/jmh/java/net/sf/jabref/benchmarks/Benchmarks.java +++ b/src/jmh/java/net/sf/jabref/benchmarks/Benchmarks.java @@ -127,7 +127,7 @@ public boolean keywordGroupContains() throws ParseException { } @Benchmark - public boolean keywordGroupContainsWord() throws ParseException { + public boolean keywordGroupContainsWord() { return KeywordGroup.containsWord("testWord", "Some longer test string containing testWord the test word"); } diff --git a/src/main/java/net/sf/jabref/gui/help/HelpAction.java b/src/main/java/net/sf/jabref/gui/help/HelpAction.java index 68e3f66e4ca..2e8854e723c 100644 --- a/src/main/java/net/sf/jabref/gui/help/HelpAction.java +++ b/src/main/java/net/sf/jabref/gui/help/HelpAction.java @@ -31,16 +31,12 @@ import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.preferences.JabRefPreferences; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - /** * This Action keeps a reference to a URL. When activated, it shows the help * Dialog unless it is already visible, and shows the URL in it. */ public class HelpAction extends MnemonicAwareAction { - private static final Log LOGGER = LogFactory.getLog(HelpAction.class); private HelpFile helpPage; diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java b/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java index c96a9ebdd66..3bed37b5f70 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java @@ -799,7 +799,7 @@ private List getSortedReferenceMarks(final XNameAccess nameAccess) } public void rebuildBibTextSection(List databases, OOBibStyle style) - throws IOException, NoSuchElementException, WrappedTargetException, IllegalArgumentException, + throws NoSuchElementException, WrappedTargetException, IllegalArgumentException, CreationException, PropertyVetoException, UnknownPropertyException, UndefinedParagraphFormatException { List cited = findCitedKeys(); Map linkSourceBase = new HashMap<>(); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java index 918212f4d56..172f89f50e5 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java @@ -242,7 +242,7 @@ private void parseAndAddEntry(String type) { } } - private void parseJabRefComment(Map meta) throws IOException { + private void parseJabRefComment(Map meta) { StringBuilder buffer = null; try { buffer = parseBracketedTextExactly(); diff --git a/src/main/java/net/sf/jabref/logic/groups/AllEntriesGroup.java b/src/main/java/net/sf/jabref/logic/groups/AllEntriesGroup.java index aaf66b253e8..00e4173f249 100644 --- a/src/main/java/net/sf/jabref/logic/groups/AllEntriesGroup.java +++ b/src/main/java/net/sf/jabref/logic/groups/AllEntriesGroup.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Optional; -import net.sf.jabref.importer.fileformat.ParseException; import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.model.entry.BibEntry; @@ -33,7 +32,7 @@ public AllEntriesGroup() { super(Localization.lang("All entries"), GroupHierarchyType.INDEPENDENT); } - public static AbstractGroup fromString(String s) throws ParseException { + public static AbstractGroup fromString(String s) { if (!s.startsWith(AllEntriesGroup.ID)) { throw new IllegalArgumentException("AllEntriesGroup cannot be created from \"" + s + "\"."); } diff --git a/src/main/java/net/sf/jabref/model/database/EntrySorter.java b/src/main/java/net/sf/jabref/model/database/EntrySorter.java index 1d078cd79f8..e71d9fc9c0e 100644 --- a/src/main/java/net/sf/jabref/model/database/EntrySorter.java +++ b/src/main/java/net/sf/jabref/model/database/EntrySorter.java @@ -22,13 +22,8 @@ import net.sf.jabref.model.entry.BibEntry; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - public class EntrySorter { - private static final Log LOGGER = LogFactory.getLog(EntrySorter.class); - // guarded by itself private final List entries; diff --git a/src/test/java/net/sf/jabref/importer/fileformat/PdfContentImporterTest.java b/src/test/java/net/sf/jabref/importer/fileformat/PdfContentImporterTest.java index 6c39de1e9eb..97bd858ac5c 100644 --- a/src/test/java/net/sf/jabref/importer/fileformat/PdfContentImporterTest.java +++ b/src/test/java/net/sf/jabref/importer/fileformat/PdfContentImporterTest.java @@ -1,6 +1,5 @@ package net.sf.jabref.importer.fileformat; -import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.Charset; import java.nio.file.Path; @@ -30,8 +29,7 @@ public void testGetDescription() { } @Test - public void doesNotHandleEncryptedPdfs() throws IOException, URISyntaxException { - PdfContentImporter importer = new PdfContentImporter(); + public void doesNotHandleEncryptedPdfs() throws URISyntaxException { Path file = Paths.get(PdfContentImporter.class.getResource("/pdfs/encrypted.pdf").toURI()); List result = importer.importDatabase(file, Charset.defaultCharset()).getDatabase().getEntries(); assertEquals(Collections.emptyList(), result); diff --git a/src/test/java/net/sf/jabref/importer/fileformat/PdfXmpImporterTest.java b/src/test/java/net/sf/jabref/importer/fileformat/PdfXmpImporterTest.java index ab6147538e2..6d79b29ef8f 100644 --- a/src/test/java/net/sf/jabref/importer/fileformat/PdfXmpImporterTest.java +++ b/src/test/java/net/sf/jabref/importer/fileformat/PdfXmpImporterTest.java @@ -49,14 +49,14 @@ public void testGetDescription() { } @Test - public void importEncryptedFileReturnsError() throws IOException, URISyntaxException { + public void importEncryptedFileReturnsError() throws URISyntaxException { Path file = Paths.get(PdfXmpImporterTest.class.getResource("/pdfs/encrypted.pdf").toURI()); ParserResult result = importer.importDatabase(file, Charset.defaultCharset()); Assert.assertTrue(result.hasWarnings()); } @Test - public void testImportEntries() throws IOException, URISyntaxException { + public void testImportEntries() throws URISyntaxException { Path file = Paths.get(PdfXmpImporterTest.class.getResource("annotated.pdf").toURI()); List bibEntries = importer.importDatabase(file, Charset.defaultCharset()).getDatabase().getEntries();