Errorprone warnings |
||
Issue description
Steps to reproduce the problem:
submitt patch to Chromium and look into logs
What is the expected behavior?
What went wrong?
../../chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java:1822: warning: [StaticAccessedFromInstance] Static method updateMetricsServiceState should not be accessed from an object instance; instead use UmaSessionStats.updateMetricsServiceState
mUmaSessionStats.updateMetricsServiceState();
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'UmaSessionStats.updateMetricsServiceState();'?
../../chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadService.java:405: warning: [StaticAccessedFromInstance] Static method trySetForcedUpload should not be accessed from an object instance; instead use CrashFileManager.trySetForcedUpload
File renamedMinidumpFile = fileManager.trySetForcedUpload(minidumpFile);
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'File renamedMinidumpFile = CrashFileManager.trySetForcedUpload(minidumpFile);'?
../../chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java:215: warning: [StringEquality] String comparison using reference equality instead of value equality
if (getIntent() != null && getIntent().getAction() == Intent.ACTION_VIEW
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (getIntent() != null && Intent.ACTION_VIEW.equals(getIntent().getAction())'?
../../chrome/android/java/src/org/chromium/chrome/browser/ChromeActionModeCallback.java:90: warning: [StaticAccessedFromInstance] Static method sanitizeQuery should not be accessed from an object instance; instead use ActionModeCallbackHelper.sanitizeQuery
String query = mHelper.sanitizeQuery(mHelper.getSelectedText(),
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'String query = ActionModeCallbackHelper.sanitizeQuery(mHelper.getSelectedText(),'?
../../chrome/android/java/src/org/chromium/chrome/browser/ChromeBackupAgent.java:88: warning: [EqualsHashCode] Classes that override equals should also override hashCode.
public boolean equals(Object other) {
^
(see http://errorprone.info/bugpattern/EqualsHashCode)
../../chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java:582: warning: [StringEquality] String comparison using reference equality instead of value equality
if (isIncomingRedirect && intent != null && intent.getAction() == Intent.ACTION_VIEW) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (isIncomingRedirect && intent != null && Intent.ACTION_VIEW.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:187: warning: [StringEquality] String comparison using reference equality instead of value equality
if (intent.getAction() == ACTION_DOWNLOAD_RESUME_ALL) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (ACTION_DOWNLOAD_RESUME_ALL.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:614: warning: [StringEquality] String comparison using reference equality instead of value equality
if (intent.getAction() == ACTION_DOWNLOAD_RESUME_ALL) return null;
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (ACTION_DOWNLOAD_RESUME_ALL.equals(intent.getAction())) return null;'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:635: warning: [StringEquality] String comparison using reference equality instead of value equality
if (intent.getAction() == ACTION_DOWNLOAD_PAUSE) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (ACTION_DOWNLOAD_PAUSE.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:642: warning: [StringEquality] String comparison using reference equality instead of value equality
} else if (intent.getAction() == ACTION_DOWNLOAD_RESUME) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean '} else if (ACTION_DOWNLOAD_RESUME.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:652: warning: [StringEquality] String comparison using reference equality instead of value equality
} else if (intent.getAction() == ACTION_DOWNLOAD_RESUME_ALL
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean '} else if (ACTION_DOWNLOAD_RESUME_ALL.equals(intent.getAction())'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:656: warning: [StringEquality] String comparison using reference equality instead of value equality
} else if (intent.getAction() == ACTION_DOWNLOAD_OPEN) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean '} else if (ACTION_DOWNLOAD_OPEN.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:669: warning: [StringEquality] String comparison using reference equality instead of value equality
: (intent.getAction() == ACTION_DOWNLOAD_OPEN
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean ': (ACTION_DOWNLOAD_OPEN.equals(intent.getAction())'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:673: warning: [StringEquality] String comparison using reference equality instead of value equality
intent.getAction() == ACTION_DOWNLOAD_OPEN ? null
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'ACTION_DOWNLOAD_OPEN.equals(intent.getAction()) ? null'?
../../chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:707: warning: [StringEquality] String comparison using reference equality instead of value equality
if (intent.getAction() != ACTION_DOWNLOAD_OPEN) {
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (!ACTION_DOWNLOAD_OPEN.equals(intent.getAction())) {'?
../../chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java:5: warning: [TopLevel] Expected at most one top-level class declaration, instead found: ChromeInterfaceRegistrar, ChromeContextInterfaceRegistrar, ChromeWebContentsInterfaceRegistrar
package org.chromium.chrome.browser.mojo;
^
(see http://errorprone.info/bugpattern/TopLevel)
Did this work before? N/A
Chrome version: 57 Channel: canary
OS Version: 6
Flash Version:
,
Jan 31 2017
../../android_webview/java/src/org/chromium/android_webview/AwActionModeCallback.java:96: warning: [StaticAccessedFromInstance] Static method sanitizeQuery should not be accessed from an object instance; instead use ActionModeCallbackHelper.sanitizeQuery
String query = mHelper.sanitizeQuery(mHelper.getSelectedText(),
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'String query = ActionModeCallbackHelper.sanitizeQuery(mHelper.getSelectedText(),'?
,
Jan 31 2017
[21071/21947] ACTION //chrome/android:chrome_junit_tests__java_binary__compile_java__javac(//build/toolchain/android:android_clang_arm)
../../chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/CastMessageHandlerTest.java:276: warning: [StringEquality] String comparison using reference equality instead of value equality
if (messageType == "MEDIA_SET_VOLUME" || messageType == "STOP_MEDIA")
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if ("MEDIA_SET_VOLUME".equals(messageType) || messageType == "STOP_MEDIA")'?
../../chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/CastMessageHandlerTest.java:276: warning: [StringEquality] String comparison using reference equality instead of value equality
if (messageType == "MEDIA_SET_VOLUME" || messageType == "STOP_MEDIA")
^
(see http://errorprone.info/bugpattern/StringEquality)
Did you mean 'if (messageType == "MEDIA_SET_VOLUME" || "STOP_MEDIA".equals(messageType))'?
../../chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java:52: warning: [StaticAccessedFromInstance] Static method schedule should not be accessed from an object instance; instead use BackgroundScheduler.schedule
scheduler.schedule(mContext, mConditions1);
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'BackgroundScheduler.schedule(mContext, mConditions1);'?
../../chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java:70: warning: [StaticAccessedFromInstance] Static method schedule should not be accessed from an object instance; instead use BackgroundScheduler.schedule
scheduler.schedule(mContext, mConditions1);
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'BackgroundScheduler.schedule(mContext, mConditions1);'?
../../chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java:74: warning: [StaticAccessedFromInstance] Static method unschedule should not be accessed from an object instance; instead use BackgroundScheduler.unschedule
scheduler.unschedule(mContext);
^
(see http://errorprone.info/bugpattern/StaticAccessedFromInstance)
Did you mean 'BackgroundScheduler.unschedule(mContext);'?
,
Feb 1 2017
Bug can be closed -> patch was submitted
,
Feb 6 2017
Thanks! Closing as per #4 |
||
►
Sign in to add a comment |
||
Comment 1 by mar...@mwiacek.com
, Jan 26 2017