code: private void checkForPotentialFilenameConflict() throws JournalException {
          File[] journalFiles =
                  MultiFileJournalHelper
                          .getSortedArrayOfJournalFiles(journalDirectory,
                                                        filenamePrefix);
          if (journalFiles.length == 0) {
              return;
          }
  
          String newestFilename = journalFiles[journalFiles.length - 1].getName();
          String potentialFilename =
                  JournalHelper.createTimestampedFilename(filenamePrefix,
                                                          new Date());
          if (newestFilename.compareTo(potentialFilename) > 0) {
              throw new JournalException("The name of one or more existing files in the journal "
                      + "directory (e.g. '"
                      + newestFilename
                      + "') may conflict with new Journal "
                      + "files. Has the system clock changed?");
          }
      }
docs: Look at the list of files in the current directory, and make sure that
  any new files we create won't conflict with them.