From 7dfb40493fa211104017bf069eb568dbbc4d9e40 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 26 May 2018 20:13:29 +0200 Subject: [PATCH 1/2] Remove unused code --- .../jabref/logic/formatter/Formatters.java | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/src/main/java/org/jabref/logic/formatter/Formatters.java b/src/main/java/org/jabref/logic/formatter/Formatters.java index 923261da3e1..d1cd14925bb 100644 --- a/src/main/java/org/jabref/logic/formatter/Formatters.java +++ b/src/main/java/org/jabref/logic/formatter/Formatters.java @@ -6,14 +6,12 @@ import java.util.Objects; import java.util.Optional; -import org.jabref.logic.formatter.bibtexfields.AddBracesFormatter; import org.jabref.logic.formatter.bibtexfields.ClearFormatter; import org.jabref.logic.formatter.bibtexfields.EscapeUnderscoresFormatter; import org.jabref.logic.formatter.bibtexfields.HtmlToLatexFormatter; import org.jabref.logic.formatter.bibtexfields.HtmlToUnicodeFormatter; import org.jabref.logic.formatter.bibtexfields.LatexCleanupFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizeDateFormatter; -import org.jabref.logic.formatter.bibtexfields.NormalizeEnDashesFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizeMonthFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter; @@ -33,42 +31,6 @@ public class Formatters { - private static final List CONVERTERS = Arrays.asList( - new HtmlToLatexFormatter(), - new HtmlToUnicodeFormatter(), - new LatexToUnicodeFormatter(), - new UnicodeToLatexFormatter() - ); - - private static final List CASE_CHANGERS = Arrays.asList( - new CapitalizeFormatter(), - new LowerCaseFormatter(), - new SentenceCaseFormatter(), - new TitleCaseFormatter(), - new UpperCaseFormatter() - ); - - private static final List OTHERS = Arrays.asList( - new AddBracesFormatter(), - new ClearFormatter(), - new LatexCleanupFormatter(), - new MinifyNameListFormatter(), - new NormalizeDateFormatter(), - new NormalizeEnDashesFormatter(), - new NormalizeMonthFormatter(), - new NormalizeNamesFormatter(), - new NormalizePagesFormatter(), - new OrdinalsToSuperscriptFormatter(), - new RegexFormatter(""), - new RemoveBracesFormatter(), - new UnitsToLatexFormatter(), - new EscapeUnderscoresFormatter() - ); - - private static final String REGEX = "regex"; - - private static final int LENGTH_OF_REGEX_PREFIX = REGEX.length(); - private Formatters() { } From 8b2c662056d6b8bddd7da23fcd86828ea0447f37 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 26 May 2018 20:13:37 +0200 Subject: [PATCH 2/2] Fix NPE --- src/main/java/org/jabref/gui/menus/FileHistoryMenu.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java b/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java index 8e5d5808160..806a2bead7b 100644 --- a/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java +++ b/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java @@ -72,7 +72,7 @@ public void openFile(String fileName) { if (!Files.exists(fileToOpen)) { dialogService.showErrorDialogAndWait( Localization.lang("File not found"), - Localization.lang("File not found") + ": " + fileToOpen.getFileName()); + Localization.lang("File not found") + ": " + fileName); history.removeItem(fileName); setItems(); return;