am 276671a3: am 4af455be: Merge "Rewriting should fail when any paths are null." into mnc-dev

* commit '276671a3d08462943fb6ae0c34fdcc85d4c63e11':
  Rewriting should fail when any paths are null.
This commit is contained in:
Jeff Sharkey
2015-05-13 19:58:47 +00:00
committed by Android Git Automerger

View File

@@ -528,7 +528,7 @@ public class FileUtils {
* {@code /after/foo/bar.txt}.
*/
public static File rewriteAfterRename(File beforeDir, File afterDir, File file) {
if (file == null) return null;
if (file == null || beforeDir == null || afterDir == null) return null;
if (contains(beforeDir, file)) {
final String splice = file.getAbsolutePath().substring(
beforeDir.getAbsolutePath().length());