Index: build/android/pylib/utils/findbugs.py |
diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py |
index fb672680fe1b6cfdef20ba0068977b2f8ab30ef8..208b0cf45dc8e5841a27f7a8bb3df7a9671912de 100644 |
--- a/build/android/pylib/utils/findbugs.py |
+++ b/build/android/pylib/utils/findbugs.py |
@@ -66,16 +66,17 @@ def _Rebaseline(current_warnings_set, known_bugs_file): |
return 0 |
-def _GetChromeClasses(release_version): |
+def _GetChromeJars(release_version): |
version = 'Debug' |
if release_version: |
version = 'Release' |
- path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', version) |
- cmd = 'find %s -name "*.class"' % path |
+ path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', version, 'lib.java') |
+ cmd = 'find %s -name "*.jar"' % path |
out = cmd_helper.GetCmdOutput(shlex.split(cmd)) |
+ out = [p for p in out.splitlines() if not p.endswith('.dex.jar')] |
if not out: |
print 'No classes found in %s' % path |
- return out |
+ return ' '.join(out) |
def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, |
@@ -135,7 +136,7 @@ def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, |
if findbug_args: |
cmd = '%s %s ' % (cmd, findbug_args) |
- chrome_classes = _GetChromeClasses(release_version) |
+ chrome_classes = _GetChromeJars(release_version) |
if not chrome_classes: |
return 1 |
cmd = '%s %s ' % (cmd, chrome_classes) |