Skip to content

Import pdf file into current library doesn't work in second time. #4422

@atteti

Description

@atteti

Tested with JabRef 4.21 64 bit Windows

Steps to reproduce the behavior:

  1. Create new BibTeX library
  2. Import into current library
  3. Select PDFContent and choose pdf file.
  4. Select Open
    file is opened
    //import second pdf file
  5. Import into current library
  6. Select PDFContent and choose pdf file.
  7. Select Open
    file is not opened
    status. importing in unknown format...

Uncaught exception occurred in Thread[JavaFX Application Thread,5,main]
java.lang.ArrayIndexOutOfBoundsException: -1
at org.jabref.logic.importer.fileformat.PdfContentImporter.proceedToNextNonEmptyLine(PdfContentImporter.java:525)
at org.jabref.logic.importer.fileformat.PdfContentImporter.importDatabase(PdfContentImporter.java:228)
at org.jabref.gui.importer.ImportMenuItem$MyWorker.run(ImportMenuItem.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at spin.Invocation.evaluate(Invocation.java:175)
at spin.off.SpinOffEvaluator.evaluate(SpinOffEvaluator.java:120)
at spin.ProxyFactory.evaluteInvocation(ProxyFactory.java:85)
at spin.JDKProxyFactory$SpinInvocationHandler.invoke(JDKProxyFactory.java:102)
at com.sun.proxy.$Proxy30.run(Unknown Source)
at org.jabref.gui.importer.ImportMenuItem.automatedImport(ImportMenuItem.java:78)
at org.jabref.gui.importer.ImportFormats$1ImportAction.doImport(ImportFormats.java:88)
at org.jabref.gui.importer.ImportFormats$1ImportAction.lambda$actionPerformed$0(ImportFormats.java:75)
at java.util.Optional.ifPresent(Unknown Source)
at org.jabref.gui.importer.ImportFormats$1ImportAction.lambda$actionPerformed$1(ImportFormats.java:75)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions