/** * Return a new <code>Properties</code> object loaded from <code>file</code>. */ public static final Properties loadSilently(File file) { return loadSilently(LocationUtils.getCanonicalPath(file)); }
protected boolean isStoreProperties(File outputFile, boolean skipIfEqual, Properties properties) { // Always return true if the file does not exist if (!LocationUtils.exists(outputFile)) { return true; } // The file might exist and contain the exact same properties, but it doesn't matter if (!skipIfEqual) { return true; } // Load the existing properties Properties loaded = PropertyUtils.loadSilently(outputFile); // Compare the loaded properties with the properties we have boolean equal = PropertyUtils.equals(loaded, properties); // If they are not equal to each other, we need to store them boolean storeProperties = !equal; // Return our value return storeProperties; }