diff --git a/.travis.yml b/.travis.yml index 2a484f8a703..909f27ead0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: java # we test at Ubuntu Trusty (Ubuntu 14.04 LTS) # see https://docs.travis-ci.com/user/trusty-ci-environment/ -# This environment is continuosly updated as described in https://docs.travis-ci.com/user/build-environment-updates/ +# This environment is continuously updated as described in https://docs.travis-ci.com/user/build-environment-updates/ dist: trusty sudo: required @@ -20,8 +20,8 @@ before_script: - mysql -u root -e 'create database jabref' script: - - ./gradlew check - - ./gradlew databaseTest + - ./gradlew check -Dscan + - ./gradlew databaseTest -Dscan # Prepare integration tests - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" @@ -30,7 +30,7 @@ script: # currently does not work: "stop: Unknown instance:" - sudo service mysql stop - sudo service postgresql stop # following services identified by "sudo service --status-all" do not need to run, too - # excluded: rsyslog (feels wrong), udev (feels wrong), friendly-recovery ("Unkonwn instance" error) + # excluded: rsyslog (feels wrong), udev (feels wrong), friendly-recovery ("Unknown instance" error) - sudo service acpid stop - sudo service atd stop - sudo service cron stop @@ -40,8 +40,8 @@ script: - sudo service resolvconf stop - sudo service sshguard stop - sudo service ssh stop - # Integratation tests run in a timeout. Just start them and kill them after 60s - - timeout 60 ./gradlew integrationTest --info || true + # Integration tests run in a timeout. Just start them and kill them after 60s. + - timeout 60 ./gradlew integrationTest -Dscan --info || true after_script: # enable codecov report diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f0c7dcbca..c43c75f8e3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# ### Fixed +- We fixed an issue which prevented JabRef from closing using the "Quit" menu command. [#2336](https://github.com/JabRef/jabref/issues/2336) - We fixed an issue which caused a metadata loss on reconnection to shared database. [#2219](https://github.com/JabRef/jabref/issues/2219) - We fixed an issue which caused an internal error when leaving the file path field empty and connecting to a shared database. - We fixed an issue where the file permissions of the .bib-file were changed upon saving [#2279](https://github.com/JabRef/jabref/issues/2279). diff --git a/build.gradle b/build.gradle index cc3c81f6eb0..bda11fe14aa 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { } plugins { + id 'com.gradle.build-scan' version '1.3' id "com.install4j.gradle" version "6.1.3" id 'com.github.johnrengelman.shadow' version '1.2.3' // If this is updated to 0.0.9, check configurations.errorprone @@ -21,6 +22,12 @@ plugins { id 'me.champeau.gradle.jmh' version '0.3.1' } +// use the gradle build scan feature: https://scans.gradle.com/get-started +buildScan { + licenseAgreementUrl = 'https://gradle.com/terms-of-service' + licenseAgree = 'yes' +} + apply plugin: "java" apply plugin: "application" apply plugin: "project-report" @@ -123,6 +130,8 @@ dependencies { compile 'org.citationstyles:styles:1.0.1-SNAPSHOT' compile 'org.citationstyles:locales:1.0.1-SNAPSHOT' compile 'de.undercouch:citeproc-java:1.0.1' + + compile 'com.github.lgooddatepicker:LGoodDatePicker:8.2.2' testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:2.2.26' diff --git a/external-libraries.txt b/external-libraries.txt index 689684feee2..4d969fa02da 100644 --- a/external-libraries.txt +++ b/external-libraries.txt @@ -145,11 +145,10 @@ Project: SwingX URL: https://swingx.java.net/ License: LGPL-3.0 -Id: microba -Path: lib/microba.jar -Project: Microba -URL: https://github.com/tdbear/microba -License: BSD +Id: com.github.lgooddatepicker:LGoodDatePicker +Project: LGoodDatePicker +URL: https://github.com/LGoodDatePicker/LGoodDatePicker +License: MIT Id: spin Path: lib/spin.jar diff --git a/lib/microba.jar b/lib/microba.jar deleted file mode 100644 index 8367e76214a..00000000000 Binary files a/lib/microba.jar and /dev/null differ diff --git a/scripts/upload-to-builds.jabref.org.sh b/scripts/upload-to-builds.jabref.org.sh index de74122845e..b2415f440ca 100755 --- a/scripts/upload-to-builds.jabref.org.sh +++ b/scripts/upload-to-builds.jabref.org.sh @@ -23,7 +23,7 @@ command="cd www/\n" # then, "snapshot" is extracted if [ "snapshot" != "$branch" ] ; then # change into dir and delete old snapshots - command="${command}mkdir $branch\ncd $branch\nrm *\n" + command="${command}mkdir $branch\ncd $branch\nrm *.dmg\nrm *.jar\nrm *.exe\n" fi #only upload [Jr]ab[Rr]ef*, not md5sums, updates.xml, etc. diff --git a/src/main/java/net/sf/jabref/gui/IconTheme.java b/src/main/java/net/sf/jabref/gui/IconTheme.java index 2177138bcca..f43f8f9bd3e 100644 --- a/src/main/java/net/sf/jabref/gui/IconTheme.java +++ b/src/main/java/net/sf/jabref/gui/IconTheme.java @@ -158,6 +158,7 @@ public enum JabRefIcon { FACEBOOK("\uf20c"), /* css: facebook */ BLOG("\uf46b"), /* css: rss */ GLOBAL_SEARCH("\uF1E7"), /* css: earth */ + DATE_PICKER("\uF0ED;"), /* css: calendar */ // STILL MISSING: GROUP_REGULAR("\uF4E6", Color.RED); diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index 38b7f28cd6b..b97af960413 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -1684,9 +1684,7 @@ public void addTab(BasePanel basePanel, boolean raisePanel) { autosaver.registerListener(new AutosaveUIManager(basePanel)); } - if (readyForBackup(context)) { - BackupManager.start(context); - } + BackupManager.start(context); } public BasePanel addTab(BibDatabaseContext databaseContext, boolean raisePanel) { @@ -1702,9 +1700,6 @@ private boolean readyForAutosave(BibDatabaseContext context) { context.getDatabaseFile().isPresent(); } - private boolean readyForBackup(BibDatabaseContext context) { - return context.getLocation() == DatabaseLocation.LOCAL && context.getDatabaseFile().isPresent(); - } /** * Creates icons for the disabled state for all JMenuItems with FontBasedIcons in the given menuElement. diff --git a/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java b/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java index a11d7710d33..6b4a3b997fa 100644 --- a/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java +++ b/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java @@ -1,26 +1,30 @@ package net.sf.jabref.gui.date; import java.awt.BorderLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Date; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import javax.swing.JComponent; import javax.swing.JPanel; import net.sf.jabref.Globals; +import net.sf.jabref.gui.IconTheme; import net.sf.jabref.gui.fieldeditors.FieldEditor; import net.sf.jabref.logic.util.date.EasyDateFormat; import net.sf.jabref.preferences.JabRefPreferences; -import com.michaelbaranov.microba.calendar.DatePicker; +import com.github.lgooddatepicker.components.DatePicker; +import com.github.lgooddatepicker.components.DatePickerSettings; +import com.github.lgooddatepicker.optionalusertools.DateChangeListener; +import com.github.lgooddatepicker.zinternaltools.DateChangeEvent; /** * wrapper and service class for the DatePicker handling at the EntryEditor */ -public class DatePickerButton implements ActionListener { +public class DatePickerButton implements DateChangeListener { - private final DatePicker datePicker = new DatePicker(); + private final DatePicker datePicker; private final JPanel panel = new JPanel(); private final FieldEditor editor; private final boolean isoFormat; @@ -28,24 +32,29 @@ public class DatePickerButton implements ActionListener { public DatePickerButton(FieldEditor pEditor, Boolean isoFormat) { this.isoFormat = isoFormat; - datePicker.showButtonOnly(true); - datePicker.addActionListener(this); - datePicker.setShowTodayButton(true); + // Create a date picker with hidden text field (showing button only). + DatePickerSettings dateSettings = new DatePickerSettings(); + dateSettings.setVisibleDateTextField(false); + dateSettings.setGapBeforeButtonPixels(0); + + datePicker = new DatePicker(dateSettings); + datePicker.addDateChangeListener(this); + datePicker.getComponentToggleCalendarButton().setIcon(IconTheme.JabRefIcon.DATE_PICKER.getIcon()); + datePicker.getComponentToggleCalendarButton().setText(""); + panel.setLayout(new BorderLayout()); panel.add(datePicker, BorderLayout.WEST); editor = pEditor; } @Override - public void actionPerformed(ActionEvent e) { - Date date = datePicker.getDate(); + public void dateChanged(DateChangeEvent dateChangeEvent) { + LocalDate date = datePicker.getDate(); if (date != null) { if (isoFormat) { - editor.setText(EasyDateFormat.isoDateFormat().getDateAt(date)); + editor.setText(date.format(DateTimeFormatter.ISO_DATE)); } else { - editor.setText(EasyDateFormat - .fromTimeStampFormat(Globals.prefs.get(JabRefPreferences.TIME_STAMP_FORMAT)) - .getDateAt(date)); + EasyDateFormat.fromTimeStampFormat(Globals.prefs.get(JabRefPreferences.TIME_STAMP_FORMAT)).getDateAt(ZonedDateTime.from(date)); } } else { // in this case the user selected "none" in the date picker, so we just clear the field diff --git a/src/main/java/net/sf/jabref/logic/autosaveandbackup/BackupManager.java b/src/main/java/net/sf/jabref/logic/autosaveandbackup/BackupManager.java index 964166ddf2d..ce24b0c4ca4 100644 --- a/src/main/java/net/sf/jabref/logic/autosaveandbackup/BackupManager.java +++ b/src/main/java/net/sf/jabref/logic/autosaveandbackup/BackupManager.java @@ -1,6 +1,5 @@ package net.sf.jabref.logic.autosaveandbackup; -import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; @@ -31,7 +30,8 @@ /** * Backups the given bib database file from {@link BibDatabaseContext} on every {@link BibDatabaseContextChangedEvent}. - * An intelligent {@link ExecutorService} with a {@link BlockingQueue} prevents a high load while making backups and rejects all redundant backup tasks. + * An intelligent {@link ExecutorService} with a {@link BlockingQueue} prevents a high load while making backups and + * rejects all redundant backup tasks. * This class does not manage the .bak file which is created when opening a database. */ public class BackupManager { @@ -44,63 +44,19 @@ public class BackupManager { private final BibDatabaseContext bibDatabaseContext; private final JabRefPreferences preferences; - private final BlockingQueue workerQueue; private final ExecutorService executor; - private final Charset charset; - - private Path originalPath; - private Path backupPath; + private final Runnable backupTask = () -> determineBackupPath().ifPresent(this::performBackup); private BackupManager(BibDatabaseContext bibDatabaseContext) { this.bibDatabaseContext = bibDatabaseContext; this.preferences = JabRefPreferences.getInstance(); - this.workerQueue = new ArrayBlockingQueue<>(1); + BlockingQueue workerQueue = new ArrayBlockingQueue<>(1); this.executor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, workerQueue); - this.charset = bibDatabaseContext.getMetaData().getEncoding().orElse(preferences.getDefaultEncoding()); - } - - - private final Runnable backupTask = new Runnable() { - @Override - public void run() { - try { - SavePreferences prefs = SavePreferences.loadForSaveFromPreferences(preferences).withEncoding(charset).withMakeBackup(false); - new BibtexDatabaseWriter<>(FileSaveSession::new).saveDatabase(bibDatabaseContext, prefs).commit(backupPath); - } catch (SaveException e) { - LOGGER.error("Error while saving file.", e); - } - } - }; - - @Subscribe - public synchronized void listen(@SuppressWarnings("unused") BibDatabaseContextChangedEvent event) { - startBackupTask(); - } - - private void startBackupTask() { - try { - executor.submit(backupTask); - } catch (RejectedExecutionException e) { - LOGGER.debug("Rejecting while another backup process is already running."); - } - } - /** - * Unregisters the BackupManager from the eventBus of {@link BibDatabaseContext} and deletes the backup file. - * This method should only be used when closing a database/JabRef legally. - */ - private void shutdown() { - bibDatabaseContext.getDatabase().unregisterListener(this); - bibDatabaseContext.getMetaData().unregisterListener(this); - executor.shutdown(); - try { - if (Files.exists(backupPath) && !Files.isDirectory(backupPath)) { - Files.delete(backupPath); - } - } catch (IOException e) { - LOGGER.error("Error while deleting the backup file.", e); - } + // Listen for change events + bibDatabaseContext.getDatabase().registerListener(this); + bibDatabaseContext.getMetaData().registerListener(this); } static Path getBackupPath(Path originalPath) { @@ -109,38 +65,26 @@ static Path getBackupPath(Path originalPath) { /** * Starts the BackupManager which is associated with the given {@link BibDatabaseContext}. - * If no database file is present in {@link BibDatabaseContext}, {@link BackupManager} will do nothing. + * As long as no database file is present in {@link BibDatabaseContext}, the {@link BackupManager} will do nothing. * * @param bibDatabaseContext Associated {@link BibDatabaseContext} */ public static BackupManager start(BibDatabaseContext bibDatabaseContext) { BackupManager backupManager = new BackupManager(bibDatabaseContext); - - Optional originalFile = bibDatabaseContext.getDatabaseFile(); - - if (originalFile.isPresent()) { - backupManager.originalPath = originalFile.get().toPath(); - backupManager.backupPath = getBackupPath(backupManager.originalPath); - backupManager.startBackupTask(); - bibDatabaseContext.getDatabase().registerListener(backupManager); - bibDatabaseContext.getMetaData().registerListener(backupManager); - runningInstances.add(backupManager); - } - + backupManager.startBackupTask(); + runningInstances.add(backupManager); return backupManager; } /** - * Shuts down the BackupManager which is associated with the given {@link BibDatabaseContext} + * Shuts down the BackupManager which is associated with the given {@link BibDatabaseContext}. * * @param bibDatabaseContext Associated {@link BibDatabaseContext} */ public static void shutdown(BibDatabaseContext bibDatabaseContext) { - runningInstances.stream().filter(instance -> instance.bibDatabaseContext == bibDatabaseContext).findAny() - .ifPresent(instance -> { - instance.shutdown(); - runningInstances.remove(instance); - }); + runningInstances.stream().filter(instance -> instance.bibDatabaseContext == bibDatabaseContext).forEach( + BackupManager::shutdown); + runningInstances.removeIf(instance -> instance.bibDatabaseContext == bibDatabaseContext); } /** @@ -166,4 +110,54 @@ public static void restoreBackup(Path originalPath) { LOGGER.error("Error while restoring the backup file.", e); } } + + private Optional determineBackupPath() { + return bibDatabaseContext.getDatabasePath().map(BackupManager::getBackupPath); + } + + private void performBackup(Path backupPath) { + try { + Charset charset = bibDatabaseContext.getMetaData().getEncoding().orElse(preferences.getDefaultEncoding()); + SavePreferences savePreferences = SavePreferences.loadForSaveFromPreferences(preferences).withEncoding + (charset).withMakeBackup(false); + new BibtexDatabaseWriter<>(FileSaveSession::new).saveDatabase(bibDatabaseContext, savePreferences).commit + (backupPath); + } catch (SaveException e) { + LOGGER.error("Error while saving file.", e); + } + } + + @Subscribe + public synchronized void listen(@SuppressWarnings("unused") BibDatabaseContextChangedEvent event) { + startBackupTask(); + } + + private void startBackupTask() { + try { + executor.submit(backupTask); + } catch (RejectedExecutionException e) { + LOGGER.debug("Rejecting while another backup process is already running."); + } + } + + /** + * Unregisters the BackupManager from the eventBus of {@link BibDatabaseContext} and deletes the backup file. + * This method should only be used when closing a database/JabRef legally. + */ + private void shutdown() { + bibDatabaseContext.getDatabase().unregisterListener(this); + bibDatabaseContext.getMetaData().unregisterListener(this); + executor.shutdown(); + determineBackupPath().ifPresent(this::deleteBackupFile); + } + + private void deleteBackupFile(Path backupPath) { + try { + if (Files.exists(backupPath) && !Files.isDirectory(backupPath)) { + Files.delete(backupPath); + } + } catch (IOException e) { + LOGGER.error("Error while deleting the backup file.", e); + } + } } diff --git a/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java b/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java index 3eb5a03dd60..25885be93f6 100644 --- a/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java +++ b/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java @@ -1,9 +1,7 @@ package net.sf.jabref.logic.util.date; -import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; -import java.util.Date; public class EasyDateFormat { @@ -32,16 +30,6 @@ public String getCurrentDate() { return getDateAt(ZonedDateTime.now()); } - /** - * Creates a readable Date string from the parameter date. The format is set - * in preferences under the key "timeStampFormat". - * - * @return The formatted date string. - */ - public String getDateAt(Date date) { - return getDateAt(date.toInstant().atZone(ZoneId.systemDefault())); - } - /** * Creates a readable Date string from the parameter date. The format is set * in preferences under the key "timeStampFormat". diff --git a/src/main/java/net/sf/jabref/model/database/BibDatabaseContext.java b/src/main/java/net/sf/jabref/model/database/BibDatabaseContext.java index 27a68623e8f..555de0fab1f 100644 --- a/src/main/java/net/sf/jabref/model/database/BibDatabaseContext.java +++ b/src/main/java/net/sf/jabref/model/database/BibDatabaseContext.java @@ -1,6 +1,7 @@ package net.sf.jabref.model.database; import java.io.File; +import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -104,11 +105,17 @@ public void setMode(BibDatabaseMode bibDatabaseMode) { * Get the file where this database was last saved to or loaded from, if any. * * @return Optional of the relevant File, or Optional.empty() if none is defined. + * @deprecated use {@link #getDatabasePath()} instead */ + @Deprecated public Optional getDatabaseFile() { return Optional.ofNullable(file); } + public Optional getDatabasePath() { + return Optional.ofNullable(file).map(File::toPath); + } + public void setDatabaseFile(File file) { this.file = file; } diff --git a/src/main/java/osx/macadapter/MacAdapter.java b/src/main/java/osx/macadapter/MacAdapter.java index 798394547c6..419eba846b9 100644 --- a/src/main/java/osx/macadapter/MacAdapter.java +++ b/src/main/java/osx/macadapter/MacAdapter.java @@ -1,18 +1,4 @@ -package osx.macadapter;/* Copyright (C) 2015 JabRef contributors. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ +package osx.macadapter; import java.io.File; import java.util.List; diff --git a/src/test/java/net/sf/jabref/logic/importer/fetcher/MedlineFetcherTest.java b/src/test/java/net/sf/jabref/logic/importer/fetcher/MedlineFetcherTest.java index e1b5d32dbb3..5b36156e6f4 100644 --- a/src/test/java/net/sf/jabref/logic/importer/fetcher/MedlineFetcherTest.java +++ b/src/test/java/net/sf/jabref/logic/importer/fetcher/MedlineFetcherTest.java @@ -28,7 +28,7 @@ public void setUp() { entryWijedasa = new BibEntry(); entryWijedasa.setType(BibLatexEntryTypes.ARTICLE); entryWijedasa.setField("author", "Wijedasa, Lahiru S and Jauhiainen, Jyrki and Könönen, Mari and Lampela, Maija and Vasander, Harri and LeBlanc, Marie-Claire and Evers, Stephanie and Smith, Thomas E L and Yule, Catherine M and Varkkey, Helena and Lupascu, Massimo and Parish, Faizal and Singleton, Ian and Clements, Gopalasamy R and Aziz, Sheema Abdul and Harrison, Mark E and Cheyne, Susan and Anshari, Gusti Z and Meijaard, Erik and Goldstein, Jenny E and Waldron, Susan and Hergoualc'h, Kristell and Dommain, René and Frolking, Steve and Evans, Christopher D and Posa, Mary Rose C and Glaser, Paul H and Suryadiputra, Nyoman and Lubis, Reza and Santika, Truly and Padfield, Rory and Kurnianto, Sofyan and Hadisiswoyo, Panut and Lim, Teck Wyn and Page, Susan E and Gauci, Vincent and van der Meer, Peter J and Buckland, Helen and Garnier, Fabien and Samuel, Marshall K and Choo, Liza Nuriati Lim Kim and O'Reilly, Patrick and Warren, Matthew and Suksuwan, Surin and Sumarga, Elham and Jain, Anuj and Laurance, William F and Couwenberg, John and Joosten, Hans and Vernimmen, Ronald and Hooijer, Aljosja and Malins, Chris and Cochrane, Mark A and Perumal, Balu and Siegert, Florian and Peh, Kelvin S-H and Comeau, Louis-Pierre and Verchot, Louis and Harvey, Charles F and Cobb, Alex and Jaafar, Zeehan and Wösten, Henk and Manuri, Solichin and Müller, Moritz and Giesen, Wim and Phelps, Jacob and Yong, Ding Li and Silvius, Marcel and Wedeux, Béatrice M M and Hoyt, Alison and Osaki, Mitsuru and Takashi, Hirano and Takahashi, Hidenori and Kohyama, Takashi S and Haraguchi, Akira and Nugroho, Nunung P and Coomes, David A and Quoi, Le Phat and Dohong, Alue and Gunawan, Haris and Gaveau, David L A and Langner, Andreas and Lim, Felix K S and Edwards, David P and Giam, Xingli and van der Werf, Guido and Carmenta, Rachel and Verwer, Caspar C and Gibson, Luke and Grandois, Laure and Graham, Laura Linda Bozena and Regalino, Jhanson and Wich, Serge A and Rieley, Jack and Kettridge, Nicholas and Brown, Chloe and Pirard, Romain and Moore, Sam and Ripoll Capilla, B and Ballhorn, Uwe and Ho, Hua Chew and Hoscilo, Agata and Lohberger, Sandra and Evans, Theodore A and Yulianti, Nina and Blackham, Grace and Onrizal and Husson, Simon and Murdiyarso, Daniel and Pangala, Sunita and Cole, Lydia E S and Tacconi, Luca and Segah, Hendrik and Tonoto, Prayoto and Lee, Janice S H and Schmilewski, Gerald and Wulffraat, Stephan and Putra, Erianto Indra and Cattau, Megan E and Clymo, R S and Morrison, Ross and Mujahid, Aazani and Miettinen, Jukka and Liew, Soo Chin and Valpola, Samu and Wilson, David and D'Arcy, Laura and Gerding, Michiel and Sundari, Siti and Thornton, Sara A and Kalisz, Barbara and Chapman, Stephen J and Su, Ahmad Suhaizi Mat and Basuki, Imam and Itoh, Masayuki and Traeholt, Carl and Sloan, Sean and Sayok, Alexander K and Andersen, Roxane"); - entryWijedasa.setField("created", "2016-9-27"); + entryWijedasa.setField("created", "2016-09-27"); entryWijedasa.setField("country", "England"); entryWijedasa.setField("doi", "10.1111/gcb.13516"); entryWijedasa.setField("issn", "1365-2486"); @@ -41,7 +41,7 @@ public void setUp() { entryWijedasa.setField("pmid", "27670948"); entryWijedasa.setField("pubmodel", "Print-Electronic"); entryWijedasa.setField("pubstatus", "aheadofprint"); - entryWijedasa.setField("revised", "2016-9-27"); + entryWijedasa.setField("revised", "2016-09-27"); entryWijedasa.setField("title", "Denial of long-term issues with agriculture on tropical peatlands will have devastating consequences."); entryWijedasa.setField("year", "2016"); @@ -49,7 +49,7 @@ public void setUp() { entryEndharti.setType(BibLatexEntryTypes.ARTICLE); entryEndharti.setField("title", "Dendrophthoe pentandra (L.) Miq extract effectively inhibits inflammation, proliferation and induces p53 expression on colitis-associated colon cancer."); entryEndharti.setField("author", "Endharti, Agustina Tri and Wulandari, Adisti and Listyana, Anik and Norahmawati, Eviana and Permana, Sofy"); - entryEndharti.setField("created", "2016-9-27"); + entryEndharti.setField("created", "2016-09-27"); entryEndharti.setField("country", "England"); entryEndharti.setField("doi", "10.1186/s12906-016-1345-0"); entryEndharti.setField("pii", "10.1186/s12906-016-1345-0"); @@ -77,11 +77,11 @@ public void setUp() { bibEntryIchikawa.setField("citation-subset", "IM"); bibEntryIchikawa.setField("completed", "2016-07-26"); bibEntryIchikawa.setField("country", "Netherlands"); - bibEntryIchikawa.setField("created", "2015-9-26"); + bibEntryIchikawa.setField("created", "2015-09-26"); bibEntryIchikawa.setField("doi", "10.1016/j.parint.2015.07.004"); bibEntryIchikawa.setField("issn", "1873-0329"); bibEntryIchikawa.setField("pubstatus", "ppublish"); - bibEntryIchikawa.setField("revised", "2015-9-26"); + bibEntryIchikawa.setField("revised", "2015-09-26"); bibEntryIchikawa.setField("issn-linking", "1383-5769"); bibEntryIchikawa.setField("issue", "6"); bibEntryIchikawa.setField("journal", "Parasitology international"); @@ -104,7 +104,7 @@ public void setUp() { bibEntrySari.setField("citation-subset", "IM"); bibEntrySari.setField("completed", "2016-04-21"); bibEntrySari.setField("country", "Thailand"); - bibEntrySari.setField("created", "2016-2-12"); + bibEntrySari.setField("created", "2016-02-12"); bibEntrySari.setField("issn", "0125-1562"); bibEntrySari.setField("issn-linking", "0125-1562"); bibEntrySari.setField("issue", "6"); @@ -112,7 +112,7 @@ public void setUp() { bibEntrySari.setField("keywords", "Antibodies, Protozoan; Antibodies, Viral, immunology; Coinfection, epidemiology, immunology; Female; HIV Infections, epidemiology; HTLV-I Antibodies, immunology; HTLV-I Infections, epidemiology, immunology; HTLV-II Antibodies, immunology; HTLV-II Infections, epidemiology, immunology; Hepatitis Antibodies, immunology; Hepatitis B Antibodies, immunology; Hepatitis C Antibodies, immunology; Hepatitis Delta Virus, immunology; Hepatitis, Viral, Human, epidemiology, immunology; Humans; Immunoglobulin G, immunology; Immunoglobulin M, immunology; Indonesia, epidemiology; Male; Prisoners; Seroepidemiologic Studies; Toxoplasma, immunology; Toxoplasmosis, epidemiology, immunology"); bibEntrySari.setField("month", "Nov"); bibEntrySari.setField("pubstatus", "ppublish"); - bibEntrySari.setField("revised", "2016-2-12"); + bibEntrySari.setField("revised", "2016-02-12"); bibEntrySari.setField("nlm-id", "0266303"); bibEntrySari.setField("owner", "NLM"); bibEntrySari.setField("pages", "977--985");