New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 725854 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-VR
Proj-XR
Proj-XR-VR

Blocked on:
issue 755685



Sign in to add a comment

Findbugs error in VrShellDelegate.

Project Member Reported by aber...@chromium.org, May 24 2017

Issue description

I just tried to do a local Findbugs build of chrome_public, trying to confirm that I had fixed a Findbugs problem of mine, and got the following Findbugs error:

FindBugs reported the following issues:
BC_UNCONFIRMED_CAST: Unchecked/unconfirmed cast
  In class org.chromium.chrome.browser.vr_shell.VrShellDelegate
  In method org.chromium.chrome.browser.vr_shell.VrShellDelegate.onActivityStateChange(Activity, int)
  At VrShellDelegate.java:[line 467]
********************************************************************************

This stops the build. I am not sure why this isn't happening on the bots.

Looking at git blame this seems to be mthiesse@'s code.
 
Owner: ymalik@chromium.org
Mind taking this Yash? Should be a 1-liner.

This isn't actually an unchecked cast - we do check it but apparently Findbugs doesn't understand type hierarchies as well as it should.

Just need to early return if the Activity is not a ChromeActivity in "case ActivityState.RESUMED:"
Agreed, it is just a slightly hidden check. The strange thing is that Findbugs on the bots seems to get this right, so it could possibly be something wrong with the setup of Findbugs on my development machine. I am also seeing a similar problem in one other place; and have asked the Clank team for suggestions for what could be wrong with my setup, but have yet to receive any replies. 

Comment 3 by ymalik@chromium.org, May 24 2017

Yes sure. 

@aberent, how do do a local Findbugs build for testing?
Add run_findbugs = true to your GN arguments.

Comment 5 by ymalik@chromium.org, May 24 2017

Status: Started (was: Assigned)

Comment 6 by ymalik@chromium.org, May 24 2017

Status: Assigned (was: Started)
I can't repro this locally.

Spoke to aberent@ offline and he'll look into the possibility of something being wrong with his setup.

Ignoring until then.
Labels: Proj-VR-Shell
Labels: -Pri-1 Needs-Feedback Pri-2
aberent: Can you reproduce? If not, can we close?
Blockedon: 755685
I am having problems running findbugs for other reasons at the moment, see issue 755685. I think the original problem is fixed, but want a successful run to be sure. I will retest once issue 755685 is fixed.
Cc: ymalik@chromium.org
Owner: jbudorick@chromium.org
Status: Started (was: Assigned)
I'm fixing this as part of 755685.
Labels: -Needs-Feedback
Awesome.  Thanks!
Status: WontFix (was: Started)
Issue 755685 was fixed.  Closing this one as well.

Sign in to add a comment