summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/javax/net
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-02-22 14:47:35 -0800
committerElliott Hughes <enh@google.com>2011-02-22 14:47:35 -0800
commita7ef55258ac71153487357b861c7639d627df82f (patch)
tree56e914bae41726d708127de8c2a6286a312d7edb /luni/src/main/java/javax/net
parent9f557fae5a751ba8de8c0bc9ba689ab23ad405f6 (diff)
downloadlibcore-a7ef55258ac71153487357b861c7639d627df82f.zip
libcore-a7ef55258ac71153487357b861c7639d627df82f.tar.gz
libcore-a7ef55258ac71153487357b861c7639d627df82f.tar.bz2
Simplify internal libcore logging.
Expose LOGE and friends for use from Java. This is handy because it lets me use printf debugging even when I've broken String or CharsetEncoder or something equally critical. It also lets us remove internal use of java.util.logging, which is slow and ugly. I've also changed Thread.suspend/resume/stop to actually throw UnsupportedOperationException rather than just logging one and otherwise doing nothing. Bug: 3477960 Change-Id: I0c3f804b1a978bf9911cb4a9bfd90b2466f8798f
Diffstat (limited to 'luni/src/main/java/javax/net')
-rw-r--r--luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java5
-rw-r--r--luni/src/main/java/javax/net/ssl/SSLSocketFactory.java9
2 files changed, 2 insertions, 12 deletions
diff --git a/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java b/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
index 61a5392..2fed280 100644
--- a/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
+++ b/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
@@ -27,8 +27,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
/**
* A HostnameVerifier that works the same way as Curl and Firefox.
@@ -182,8 +180,7 @@ class DefaultHostnameVerifier implements HostnameVerifier {
try {
subjectAlternativeNames = cert.getSubjectAlternativeNames();
} catch (CertificateParsingException cpe) {
- Logger.getLogger(DefaultHostnameVerifier.class.getName())
- .log(Level.FINE, "Error parsing certificate.", cpe);
+ System.logI("Error parsing certificate", cpe);
return Collections.emptyList();
}
diff --git a/luni/src/main/java/javax/net/ssl/SSLSocketFactory.java b/luni/src/main/java/javax/net/ssl/SSLSocketFactory.java
index 1f3aa42..817f52f 100644
--- a/luni/src/main/java/javax/net/ssl/SSLSocketFactory.java
+++ b/luni/src/main/java/javax/net/ssl/SSLSocketFactory.java
@@ -21,8 +21,6 @@ import java.io.IOException;
import java.net.Socket;
import java.security.NoSuchAlgorithmException;
import java.security.Security;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import javax.net.SocketFactory;
/**
@@ -57,7 +55,7 @@ public abstract class SSLSocketFactory extends SocketFactory {
final Class<?> sfc = Class.forName(defaultName, true, cl);
defaultSocketFactory = (SocketFactory) sfc.newInstance();
} catch (Exception e) {
- log("SSLSocketFactory", "Problem creating " + defaultName, e);
+ System.logE("Problem creating " + defaultName, e);
}
}
}
@@ -80,11 +78,6 @@ public abstract class SSLSocketFactory extends SocketFactory {
return defaultSocketFactory;
}
- @SuppressWarnings("unchecked")
- private static void log(String tag, String msg, Throwable throwable) {
- Logger.getLogger(tag).log(Level.INFO, msg, throwable);
- }
-
/**
* Creates a new {@code SSLSocketFactory}.
*/