Skip to content
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

NPE when renaming a file #890

Closed
koppor opened this issue Feb 28, 2016 · 1 comment · Fixed by #903
Closed

NPE when renaming a file #890

koppor opened this issue Feb 28, 2016 · 1 comment · Fixed by #903
Labels
bug Confirmed bugs or reports that are very likely to be bugs

Comments

@koppor
Copy link
Member

koppor commented Feb 28, 2016

JabRef v3.3dev 2016-02-28--master--a0444ab

I've searched for an entry as I lost it somehow:

grabbed_20160228-211449

Now, I'm dropping the PDF onto the preview. Nothing happens, but an NPE is raised and output at "Exceptions":

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at java.util.Objects.requireNonNull(Unknown Source)
    at net.sf.jabref.logic.search.MatchesHighlighter.highlightWordsWithHTML(MatchesHighlighter.java:26)
    at net.sf.jabref.logic.layout.LayoutEntry.doLayout(LayoutEntry.java:234)
    at net.sf.jabref.logic.layout.Layout.doLayout(Layout.java:123)
    at net.sf.jabref.logic.layout.Layout.doLayout(Layout.java:110)
    at net.sf.jabref.util.Util.getLinkedFileName(Util.java:212)
    at net.sf.jabref.external.DroppedFileHandler.showLinkMoveCopyRenameDialog(DroppedFileHandler.java:363)
    at net.sf.jabref.external.DroppedFileHandler.handleDroppedfile(DroppedFileHandler.java:143)
    at net.sf.jabref.gui.fieldeditors.FileListEditorTransferHandler$1.run(FileListEditorTransferHandler.java:133)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

My filename format pattern is \bibtexkey\begin{title} - \format[RemoveBrackets]{\title}\end{title}.

@oscargus
Copy link
Contributor

In the two argument Layout constructor: can you change null to Optional.empty()?

@matthiasgeiger matthiasgeiger added the bug Confirmed bugs or reports that are very likely to be bugs label Mar 1, 2016
oscargus added a commit that referenced this issue Mar 4, 2016
@oscargus oscargus mentioned this issue Mar 4, 2016
4 tasks
oscargus added a commit that referenced this issue Mar 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants