summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoraurimas <aurimas@chromium.org>2014-09-25 10:35:37 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-25 17:36:03 +0000
commitd350ea5cedf5d3b139f7d88c3c66b3f5e36952c7 (patch)
treee65141e048dfb32b80a0797ef27bfe3bba2b18b2 /net
parentf89c3a34a93ae0bccf69046febe03c61b14f932f (diff)
downloadchromium_src-d350ea5cedf5d3b139f7d88c3c66b3f5e36952c7.zip
chromium_src-d350ea5cedf5d3b139f7d88c3c66b3f5e36952c7.tar.gz
chromium_src-d350ea5cedf5d3b139f7d88c3c66b3f5e36952c7.tar.bz2
[Checkstyle] Fix misc style issues in Java files.
BUG=318404 TBR=zea@chromium.org,mkosiba@chromium.org Review URL: https://codereview.chromium.org/600983002 Cr-Commit-Position: refs/heads/master@{#296734}
Diffstat (limited to 'net')
-rw-r--r--net/android/java/src/org/chromium/net/ProxyChangeListener.java14
-rw-r--r--net/android/java/src/org/chromium/net/X509Util.java11
2 files changed, 11 insertions, 14 deletions
diff --git a/net/android/java/src/org/chromium/net/ProxyChangeListener.java b/net/android/java/src/org/chromium/net/ProxyChangeListener.java
index b130da0..51b6714 100644
--- a/net/android/java/src/org/chromium/net/ProxyChangeListener.java
+++ b/net/android/java/src/org/chromium/net/ProxyChangeListener.java
@@ -101,9 +101,9 @@ public class ProxyChangeListener {
// TODO(sgurun): once android.net.ProxyInfo is public, rewrite this.
private ProxyConfig extractNewProxy(Intent intent) {
try {
- final String GET_HOST_NAME = "getHost";
- final String GET_PORT_NAME = "getPort";
- final String GET_PAC_FILE_URL = "getPacFileUrl";
+ final String getHostName = "getHost";
+ final String getPortName = "getPort";
+ final String getPacFileUrl = "getPacFileUrl";
String className;
String proxyInfo;
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
@@ -120,8 +120,8 @@ public class ProxyChangeListener {
}
Class<?> cls = Class.forName(className);
- Method getHostMethod = cls.getDeclaredMethod(GET_HOST_NAME);
- Method getPortMethod = cls.getDeclaredMethod(GET_PORT_NAME);
+ Method getHostMethod = cls.getDeclaredMethod(getHostName);
+ Method getPortMethod = cls.getDeclaredMethod(getPortName);
String host = (String) getHostMethod.invoke(props);
int port = (Integer) getPortMethod.invoke(props);
@@ -129,14 +129,14 @@ public class ProxyChangeListener {
// TODO(xunjieli): rewrite this once the API is public.
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
Method getPacFileUrlMethod =
- cls.getDeclaredMethod(GET_PAC_FILE_URL);
+ cls.getDeclaredMethod(getPacFileUrl);
String pacFileUrl = (String) getPacFileUrlMethod.invoke(props);
if (!TextUtils.isEmpty(pacFileUrl)) {
return new ProxyConfig(host, port, pacFileUrl);
}
} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
Method getPacFileUrlMethod =
- cls.getDeclaredMethod(GET_PAC_FILE_URL);
+ cls.getDeclaredMethod(getPacFileUrl);
Uri pacFileUrl = (Uri) getPacFileUrlMethod.invoke(props);
if (!Uri.EMPTY.equals(pacFileUrl)) {
return new ProxyConfig(host, port, pacFileUrl.toString());
diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java
index 934ec40..00a24e4 100644
--- a/net/android/java/src/org/chromium/net/X509Util.java
+++ b/net/android/java/src/org/chromium/net/X509Util.java
@@ -55,14 +55,11 @@ public class X509Util {
if (intent.getAction().equals(KeyChain.ACTION_STORAGE_CHANGED)) {
try {
reloadDefaultTrustManager();
- }
- catch (CertificateException e) {
+ } catch (CertificateException e) {
Log.e(TAG, "Unable to reload the default TrustManager", e);
- }
- catch (KeyStoreException e) {
+ } catch (KeyStoreException e) {
Log.e(TAG, "Unable to reload the default TrustManager", e);
- }
- catch (NoSuchAlgorithmException e) {
+ } catch (NoSuchAlgorithmException e) {
Log.e(TAG, "Unable to reload the default TrustManager", e);
}
}
@@ -377,7 +374,7 @@ public class X509Util {
}
// If the subject and public key match, this is a system root.
- X509Certificate anchorX509 = (X509Certificate)anchor;
+ X509Certificate anchorX509 = (X509Certificate) anchor;
if (root.getSubjectX500Principal().equals(anchorX509.getSubjectX500Principal()) &&
root.getPublicKey().equals(anchorX509.getPublicKey())) {
sSystemTrustAnchorCache.add(key);