Adding @SuppressWarnings(NoSynchronizedMethodCheck).

In https://chromium-review.googlesource.com/c/chromium/src/+/750645
Chromium started to use an ErrorProne plugin to discourage synchronized
public methods (an encourage the usage of synchronized blocks).

In order to unblock the Chromium Roll we can suppress these warnings
and decide if we want to align with Chromium on this check or ask
them to make it optional.

More details in the bug.

TBR=magjed@webrtc.org

Bug: webrtc:8491
Change-Id: Ie77a324e54aab44a4f59853959549f1d21f884a0
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/20060
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20569}
This commit is contained in:
Mirko Bonadei
2017-11-05 19:35:31 -08:00
committed by Commit Bot
parent 08a9c372df
commit 12251b6386
13 changed files with 164 additions and 0 deletions

View File

@ -104,6 +104,8 @@ public class Logging {
// Enable diagnostic logging for messages of |severity| to the platform debug
// output. On Android, the output will be directed to Logcat.
// Note: this function starts collecting the output of the LOG() macros.
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
@SuppressWarnings("NoSynchronizedMethodCheck")
public static synchronized void enableLogToDebugOutput(Severity severity) {
if (!loadNativeLibrary()) {
fallbackLogger.log(Level.WARNING, "Cannot enable logging because native lib not loaded.");