Commit cc1712d6 authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Fix errorprone JavaLangClash warnings

Fix errorprone JavaLangClash warnings and make
sure it is treated as error after this CL.

http://errorprone.info/bugpattern/JavaLangClash

Bug: 801253
Change-Id: I5958e0e1c3d15e637b04c12e2810dee0cfb16cfc
Reviewed-on: https://chromium-review.googlesource.com/929755Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#538903}
parent 7228ad14
......@@ -23,8 +23,6 @@ import colorama
ERRORPRONE_WARNINGS_TO_TURN_OFF = [
# TODO(crbug.com/801210): Follow steps in bug.
'SynchronizeOnNonFinalField',
# TODO(crbug.com/801253): Follow steps in bug.
'JavaLangClash',
# TODO(crbug.com/801261): Follow steps in bug
'ArgumentSelectionDefectChecker',
# TODO(crbug.com/801268): Follow steps in bug.
......@@ -101,6 +99,7 @@ ERRORPRONE_WARNINGS_TO_TURN_OFF = [
ERRORPRONE_WARNINGS_TO_ERROR = [
# Add warnings to this after fixing/suppressing all instances in our codebase.
'FloatingPointLiteralPrecision',
'JavaLangClash',
'MissingOverride',
'ParameterName',
'StaticQualifiedUsingExpression',
......
......@@ -29,6 +29,7 @@ public class WebApkVerifySignature {
ERROR_INCORRECT_SIGNATURE, ERROR_SIGNATURE_NOT_FOUND, ERROR_TOO_MANY_META_INF_FILES,
ERROR_BAD_BLANK_SPACE, ERROR_BAD_V2_SIGNING_BLOCK,
})
@SuppressWarnings("JavaLangClash")
public @interface Error {}
public static final int ERROR_OK = 0;
public static final int ERROR_BAD_APK = 1;
......
......@@ -8,11 +8,12 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import org.chromium.base.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.chromium.base.Log;
import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
......@@ -25,6 +26,7 @@ import java.util.Locale;
import java.util.Scanner;
/** Helper for fetching and modifying the host list. */
@SuppressWarnings("JavaLangClash")
public class HostListManager {
public enum Error {
AUTH_FAILED,
......
......@@ -21,6 +21,7 @@ import java.io.IOException;
* This helper class fetches an OAuth token on a separate thread, and properly handles the various
* error-conditions that can occur (such as, starting an Activity to prompt user for input).
*/
@SuppressWarnings("JavaLangClash")
public class OAuthTokenFetcher {
/**
* Callback interface to receive the token, or an error notification. These will be called
......
......@@ -7,6 +7,7 @@ package org.chromium.chromoting.jni;
import org.chromium.chromoting.R;
/** Interface used for connection state notifications. */
@SuppressWarnings("JavaLangClash")
public interface ConnectionListener {
/**
* This enum must match the C++ enumeration remoting::protocol::ConnectionToHost::State.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment