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

Unified Diff: content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address cjhopman's comment + rebase Created 5 years, 9 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
Index: content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java b/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
index 52658f3401c0094a955aab77e7d7bc7b798fcf66..b1a16516d5fadb8179035d1b5c04139e9c729e5d 100644
--- a/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
@@ -7,6 +7,7 @@ package org.chromium.content.common;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -30,6 +31,7 @@ public class CleanupReferenceTest extends InstrumentationTestCase {
}
};
+ @SuppressFBWarnings("URF_UNREAD_FIELD")
public ReferredObject() {
sObjectCount.incrementAndGet();
mRef = new CleanupReference(this, new DestroyRunnable());
@@ -42,6 +44,7 @@ public class CleanupReferenceTest extends InstrumentationTestCase {
sObjectCount.set(0);
}
+ @SuppressFBWarnings("DM_GC")
private void collectGarbage() {
// While this is only a 'hint' to the VM, it's generally effective and sufficient on
// dalvik. If this changes in future, maybe try allocating a few gargantuan objects
@@ -49,6 +52,7 @@ public class CleanupReferenceTest extends InstrumentationTestCase {
System.gc();
}
+ @SuppressFBWarnings("DLS_DEAD_LOCAL_STORE")
@SmallTest
@Feature({"AndroidWebView"})
public void testCreateSingle() throws Throwable {

Powered by Google App Engine
This is Rietveld 408576698