Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java

Issue 1002883002: Fix up if statement curly braces issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
diff --git a/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java b/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
index 2a6c2f242662688f8d85c86df7a37049f73cd171..3fbf60ca29fef6b5d7ccaddbf427575c2576537c 100644
--- a/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
+++ b/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
@@ -132,14 +132,13 @@ public class DefaultAndroidKeyStore implements AndroidKeyStore {
@Override
public int getPrivateKeyType(AndroidPrivateKey key) {
PrivateKey javaKey = ((DefaultAndroidPrivateKey) key).getJavaKey();
- if (javaKey instanceof RSAPrivateKey)
- return PrivateKeyType.RSA;
- if (javaKey instanceof DSAPrivateKey)
- return PrivateKeyType.DSA;
- if (javaKey instanceof ECPrivateKey)
+ if (javaKey instanceof RSAPrivateKey) return PrivateKeyType.RSA;
+ if (javaKey instanceof DSAPrivateKey) return PrivateKeyType.DSA;
+ if (javaKey instanceof ECPrivateKey) {
return PrivateKeyType.ECDSA;
- else
+ } else {
return PrivateKeyType.INVALID;
+ }
}
private Object getOpenSSLKeyForPrivateKey(AndroidPrivateKey key) {
@@ -203,8 +202,7 @@ public class DefaultAndroidKeyStore implements AndroidKeyStore {
@Override
public long getOpenSSLHandleForPrivateKey(AndroidPrivateKey key) {
Object opensslKey = getOpenSSLKeyForPrivateKey(key);
- if (opensslKey == null)
- return 0;
+ if (opensslKey == null) return 0;
try {
// Use reflection to invoke the 'getPkeyContext' method on the
@@ -257,8 +255,7 @@ public class DefaultAndroidKeyStore implements AndroidKeyStore {
}
Object opensslKey = getOpenSSLKeyForPrivateKey(key);
- if (opensslKey == null)
- return null;
+ if (opensslKey == null) return null;
try {
// Use reflection to invoke the 'getEngine' method on the

Powered by Google App Engine
This is Rietveld 408576698