Skip to content

Unrobust reading of bad @Comment #1632

@oscargus

Description

@oscargus

JabRef version

I got a BIB file from a comment to clean up and it couldn't be read. The "Error opening file" gave the informative message "null".

The reasons seems to be this line:

@Comment Any references

as the log message says (the line above is line 5):

11:28:12.979 [JabRef CachedThreadPool] ERROR net.sf.jabref.importer.OpenDatabaseAction - Error loading database C:\Users\Oscar\Documents\bibl.bib
java.io.IOException: Error in line 5: Expected { but received  
    at net.sf.jabref.importer.fileformat.BibtexParser.consume(BibtexParser.java:915) ~[bin/:?]
    at net.sf.jabref.importer.fileformat.BibtexParser.parseBracketedTextExactly(BibtexParser.java:856) ~[bin/:?]

Not sure what I expect to happen, but maybe that the error message "Error in line 5: Expected { but received " is shown. Not sure if it is worthwhile to support this somehow understandable interpretation of @comment though...

Metadata

Metadata

Assignees

No one assigned

    Labels

    [outdated] type: bugConfirmed bugs or reports that are very likely to be bugs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions