New issue
Advanced search Search tips

Issue 597985 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Findbugs not playing nice with incrementalinstall package in GN

Project Member Reported by dfalcant...@chromium.org, Mar 25 2016

Issue description

Unsure why this is happening, but I'm compiling with these flags and making FindBugs unhappy:
gn gen out/$BUILDTYPE --args='target_os="android" target_cpu="arm" use_goma=true is_debug=true run_findbugs=true is_clang=true'

Andrew, any ideas?

FindBugs reported the following issues:
REC_CATCH_EXCEPTION: Exception is caught when Exception is not thrown
  In class org.chromium.incrementalinstall.BootstrapApplication
  In method org.chromium.incrementalinstall.BootstrapApplication.attachBaseContext(Context)
  At BootstrapApplication.java:[line 144]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.loadDexFiles(File)
  Called method java.io.File.setWritable(boolean, boolean)
  At ClassLoaderPatcher.java:[line 65]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.loadDexFiles(File)
  Called method java.io.File.mkdir()
  At ClassLoaderPatcher.java:[line 60]
  Another occurrence at ClassLoaderPatcher.java:[line 64]
  Another occurrence at ClassLoaderPatcher.java:[line 76]
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: Possible null pointer dereference due to return value of called method
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.loadDexFiles(File)
  Dereferenced at ClassLoaderPatcher.java:[line 79]
  Known null at ClassLoaderPatcher.java:[line 79]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.loadDexFiles(File)
  Called method java.io.File.delete()
  At ClassLoaderPatcher.java:[line 80]
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: Possible null pointer dereference due to return value of called method
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.loadDexFiles(File)
  Dereferenced at ClassLoaderPatcher.java:[line 82]
  Known null at ClassLoaderPatcher.java:[line 82]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.importNativeLibs(File)
  Called method java.io.File.mkdir()
  At ClassLoaderPatcher.java:[line 122]
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: Possible null pointer dereference due to return value of called method
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.copyChangedFiles(File, File)
  Dereferenced at ClassLoaderPatcher.java:[line 176]
  Known null at ClassLoaderPatcher.java:[line 176]
OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE: Method may fail to clean up stream or resource on checked exception
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.copyIfModified(File, File)
  Reference type java.io.InputStream
  Obligation to clean up resource created at ClassLoaderPatcher.java:[line 194] is not discharged
  Path continues at ClassLoaderPatcher.java:[line 195]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.copyIfModified(File, File)
  Called method java.io.File.setLastModified(long)
  At ClassLoaderPatcher.java:[line 201]
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value
  In class org.chromium.incrementalinstall.ClassLoaderPatcher
  In method org.chromium.incrementalinstall.ClassLoaderPatcher.ensureAppFilesSubDirExists()
  Called method java.io.File.mkdir()
  At ClassLoaderPatcher.java:[line 206]
OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE: Method may fail to clean up stream or resource on checked exception
  In class org.chromium.incrementalinstall.LockFile
  In method org.chromium.incrementalinstall.LockFile.clearInstallerLock(File)
  Reference type java.io.OutputStream
  Obligation to clean up resource created at LockFile.java:[line 37] is not discharged
  Path continues at LockFile.java:[line 38]
NP_LOAD_OF_KNOWN_NULL_VALUE: Load of known null value
  In class org.chromium.incrementalinstall.Reflect
  In method org.chromium.incrementalinstall.Reflect.findMethod(Class, String, Object[])
  At Reflect.java:[line 104]
********************************************************************************
 
Don't think I hit this normally because I don't normally build all targets, but the bots don't seem to be hitting it, AFAICT.
Status: Started (was: Untriaged)
Looks like I should just be setting findbugs=false for the bootstrap target.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fdf674027595a3efb29a9e9de92964305fe62fc7

commit fdf674027595a3efb29a9e9de92964305fe62fc7
Author: agrieve <agrieve@chromium.org>
Date: Tue Mar 29 18:21:06 2016

Fix incremental install when run_findbugs = true

BUG= 597985 

Review URL: https://codereview.chromium.org/1839003004

Cr-Commit-Position: refs/heads/master@{#383775}

[modify] https://crrev.com/fdf674027595a3efb29a9e9de92964305fe62fc7/build/android/incremental_install/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment