Repository: jabref/jabref
Issue: InvalidPathException after right-click on entry with an eprint via arXiv fetcher

JabRef version JabRef 5.1--2020-05-21--950d9c0 on  Windows 10

- [X] **Mandatory**: I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists

<!-- Add a clear and concise description of what the bug is. -->

Steps to reproduce the behavior:
1. Go to the web search pane
2. Enter search keywords in the text field
3. Import entry
4. Right-click on the entry in the main table

<!-- If applicable, add excerpt of the bibliography file, screenshot, and excerpt of log (available in the error console) -->

<details>
  <summary>Log File</summary>
  
  ```
 java.nio.file.InvalidPathException: Illegal char <:> at index 4: http://arxiv.org/pdf/1911.01235v1
	at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
	at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
	at java.base/java.nio.file.Path.resolve(Unknown Source)
	at org.jabref/org.jabref.model.util.FileHelper.find(Unknown Source)
	at org.jabref/org.jabref.model.util.FileHelper.lambda$find$0(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.jabref/org.jabref.model.util.FileHelper.find(Unknown Source)
	at org.jabref/org.jabref.model.util.FileHelper.find(Unknown Source)
	at org.jabref/org.jabref.gui.actions.ActionHelper.lambda$isFilePresentForSelectedEntry$3(Unknown Source)
	at java.base/java.util.Optional.map(Unknown Source)
	at com.tobiasdiez.easybind/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source)
	at com.tobiasdiez.easybind/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectBinding.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectExpression.getValue(Unknown Source)
	at com.tobiasdiez.easybind/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$3.computeValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectBinding.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectExpression.getValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanExpression$2.computeValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.Bindings$BooleanAndBinding.computeValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.Bindings$52.computeValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanExpression.getValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanExpression.getValue(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.invalidate(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.invalidate(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.Bindings$ShortCircuitAndInvalidator.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.BooleanBinding.invalidate(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectBinding.invalidate(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.beans.binding.ObjectBinding.invalidate(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.fireChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.commit(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ModifiableObservableListBase.setAll(Unknown Source)
	at org.jabref/org.jabref.gui.StateManager.setSelectedEntries(Unknown Source)
	at org.jabref/org.jabref.gui.BasePanel.lambda$createMainTable$1(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.fireChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.commit(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$1(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.fireChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.commit(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.collections.ObservableListBase.endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.control.ControlUtils.updateSelectedIndices(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.control.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.control.TableView$TableViewSelectionModel.clearAndSelect(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.event.Event.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at org.jabref.merged.module@5.1.423/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at org.jabref.merged.module@5.1.423/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

  ```
</details>


Changed files:
src/main/java/org/jabref/gui/actions/ActionHelper.java

diff --git a/src/main/java/org/jabref/gui/actions/ActionHelper.java b/src/main/java/org/jabref/gui/actions/ActionHelper.java
index bbb22b6022..dfad438f8c 100644
--- a/src/main/java/org/jabref/gui/actions/ActionHelper.java
+++ b/src/main/java/org/jabref/gui/actions/ActionHelper.java
@@ -55,6 +55,10 @@ public class ActionHelper {
             List<LinkedFile> files = entry.getFiles();
 
             if ((entry.getFiles().size() > 0) && stateManager.getActiveDatabase().isPresent()) {
+                if (files.get(0).isOnlineLink()) {
+                    return true;
+                }
+
                 Optional<Path> filename = FileHelper.find(
                         stateManager.getActiveDatabase().get(),
                         files.get(0).getLink(),