From e3ceea26ba2362c8e21df9ddba439e94c431bad8 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Mon, 3 Feb 2025 16:43:08 +0200 Subject: [PATCH] Add comment for binary-based importers (#12446) --- src/main/java/org/jabref/logic/importer/Importer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/jabref/logic/importer/Importer.java b/src/main/java/org/jabref/logic/importer/Importer.java index 6a31aa427ef..c14a535d987 100644 --- a/src/main/java/org/jabref/logic/importer/Importer.java +++ b/src/main/java/org/jabref/logic/importer/Importer.java @@ -77,6 +77,12 @@ public boolean isRecognizedFormat(String data) throws IOException { *

* If importing in a specified format and an empty library is returned, JabRef reports that no entries were found. *

+ * If your format is binary-based (PDF, ZIP-based, or others), then you should not solely override this method. + * For binary formats do this: + * 1. Throw {@link UnsupportedOperationException} in this method. + * 2. Override the method {@link Importer#importDatabase(Path)}. + * Example of this workaround is in: {@link org.jabref.logic.importer.fileformat.pdf.PdfImporter}. + *

* This method should never return null. * * @param input the input to read from