Skip to content

Commit

Permalink
Always return new entry
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Jul 23, 2016
1 parent 6dbad6b commit f606ec7
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions src/main/java/net/sf/jabref/logic/util/TestEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,24 @@

public class TestEntry {

private static BibEntry entry;


public static BibEntry getTestEntry() {
if (entry == null) {
entry = new BibEntry(IdGenerator.next(), "article");
entry.setField(FieldName.AUTHOR, "Smith, Bill and Jones, Bob and Williams, Jeff");
entry.setField(FieldName.EDITOR, "Taylor, Phil");
entry.setField(FieldName.TITLE, "Title of the test entry");
entry.setField(FieldName.NUMBER, "3");
entry.setField(FieldName.VOLUME, "34");
entry.setField(FieldName.YEAR, "2016");
entry.setField(FieldName.PAGES, "45--67");
entry.setField(FieldName.MONTH, "July");
entry.setField(FieldName.FILE, ":testentry.pdf:PDF");
entry.setField(FieldName.JOURNAL, "BibTeX Journal");
entry.setField(FieldName.PUBLISHER, "JabRef Publishing");
entry.setField(FieldName.ADDRESS, "Trondheim");
entry.setField(FieldName.URL, "https://github.com/JabRef");
entry.setField(FieldName.ABSTRACT,
"This entry describes a test scenario which may be useful in JabRef. By providing a test entry it is possible to see how certain things will look in this graphical bib-file mananger.");
}

BibEntry entry = new BibEntry(IdGenerator.next(), "article");
entry.setField(FieldName.AUTHOR, "Smith, Bill and Jones, Bob and Williams, Jeff");
entry.setField(FieldName.EDITOR, "Taylor, Phil");
entry.setField(FieldName.TITLE, "Title of the test entry");
entry.setField(FieldName.NUMBER, "3");
entry.setField(FieldName.VOLUME, "34");
entry.setField(FieldName.YEAR, "2016");
entry.setField(FieldName.PAGES, "45--67");
entry.setField(FieldName.MONTH, "July");
entry.setField(FieldName.FILE, ":testentry.pdf:PDF");
entry.setField(FieldName.JOURNAL, "BibTeX Journal");
entry.setField(FieldName.PUBLISHER, "JabRef Publishing");
entry.setField(FieldName.ADDRESS, "Trondheim");
entry.setField(FieldName.URL, "https://github.com/JabRef");
entry.setField(FieldName.ABSTRACT,
"This entry describes a test scenario which may be useful in JabRef. By providing a test entry it is possible to see how certain things will look in this graphical bib-file mananger.");
return entry;
}
}

0 comments on commit f606ec7

Please sign in to comment.