public static boolean containsMetadata(File folder) { CvsVersioningSystem.LOG.log(Level.FINER, " containsMetadata {0}", new Object[] {folder}); long t = System.currentTimeMillis(); File repository = new File(folder, CvsVersioningSystem.FILENAME_CVS_REPOSITORY); File entries = new File(folder, CvsVersioningSystem.FILENAME_CVS_ENTRIES); boolean ret = repository.exists() && entries.exists(); if (CvsVersioningSystem.LOG.isLoggable(Level.FINER)) { CvsVersioningSystem.LOG.log( Level.FINER, " containsMetadata returns {0} after {1} millis", new Object[] {ret, System.currentTimeMillis() - t}); } return ret; }
/** * Validates annotation format text * * @param format format to be validatet * @return <code>true</code> if the format is correct, <code>false</code> otherwise. */ public static boolean isAnnotationFormatValid(final String format) { boolean retval = true; if (format != null) { try { new MessageFormat(format); } catch (IllegalArgumentException ex) { CvsVersioningSystem.LOG.log(Level.FINER, "Bad user input - annotation format", ex); retval = false; } } return retval; }