Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2535)

Unified Diff: base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java

Issue 269603002: Fix a findbugs warning - check file.delete return value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/findbugs_filter/findbugs_known_bugs.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java
diff --git a/base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java b/base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java
index a64b72fcf360a87467569048cb5f775eb4833f4e..ca6e73bb1c7d1ba152aa1d5f7edc6a735d2433fe 100644
--- a/base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java
+++ b/base/test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java
@@ -44,7 +44,8 @@ public class TestFileUtil {
public static void deleteFile(String name) {
File file = new File(name);
- file.delete();
+ boolean deleted = file.delete();
+ assert (deleted || !file.exists());
}
/**
« no previous file with comments | « no previous file | build/android/findbugs_filter/findbugs_known_bugs.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698