-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files can be dropped to entry preview panel to attach a file again. #3135
Conversation
|
||
if (t.isDataFlavorSupported(urlFlavor)) { | ||
List<File> transferedFiles = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor); | ||
files.addAll(transferedFiles.stream().map(file -> file.toPath()).collect(Collectors.toList())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use static reference: File::toPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And mabye add a comment that it has to be a File object and not a path. I remember that I fixed this before the regression and that java only recognizes this, if it is file object;)
} | ||
|
||
if (t.isDataFlavorSupported(urlFlavor)) { | ||
List<File> transferedFiles = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nitpick, but since you're already at it could you please change this variables name from t
to someting more meaningful?
Otherwise the code looks fine.
This fixes koppor#245. The issue was caused during a code cleanup at #2723: https://github.com/JabRef/jabref/pull/2723/files#diff-093fbc56554f6c75313823ee81f28ec6L152
gradle localizationUpdate
?