aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-10-30 16:06:47 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2013-10-30 16:06:47 +0100
commite83dd07471448255378e9436ded77cc33af7444a (patch)
tree9052fe6159023ca94bc4ad32e1c5d72e10f73c43
parent3e364dd2be0f85c9d6da0ee053db2cc2455c98d3 (diff)
downloadsonarqube-e83dd07471448255378e9436ded77cc33af7444a.tar.gz
sonarqube-e83dd07471448255378e9436ded77cc33af7444a.zip
Rename the inner class HttpsTrust.Ssl
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpsTrust.java8
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpsTrust.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpsTrust.java
index d07f3690d35..16a48fa32e2 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpsTrust.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpsTrust.java
@@ -31,9 +31,9 @@ import java.security.cert.X509Certificate;
*/
class HttpsTrust {
- static HttpsTrust INSTANCE = new HttpsTrust(new SslContext());
+ static HttpsTrust INSTANCE = new HttpsTrust(new Ssl());
- static class SslContext {
+ static class Ssl {
SSLSocketFactory newFactory(TrustManager... managers) throws NoSuchAlgorithmException, KeyManagementException {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, managers, new SecureRandom());
@@ -44,7 +44,7 @@ class HttpsTrust {
private final SSLSocketFactory socketFactory;
private final HostnameVerifier hostnameVerifier;
- HttpsTrust(SslContext context) {
+ HttpsTrust(Ssl context) {
this.socketFactory = createSocketFactory(context);
this.hostnameVerifier = createHostnameVerifier();
}
@@ -60,7 +60,7 @@ class HttpsTrust {
/**
* Trust all certificates
*/
- private SSLSocketFactory createSocketFactory(SslContext context) {
+ private SSLSocketFactory createSocketFactory(Ssl context) {
try {
return context.newFactory(new AlwaysTrustManager());
} catch (Exception e) {
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java
index 494b504a734..5d35d44374b 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpsTrustTest.java
@@ -83,7 +83,7 @@ public class HttpsTrustTest {
@Test
public void failOnError() throws Exception {
- HttpsTrust.SslContext context = mock(HttpsTrust.SslContext.class);
+ HttpsTrust.Ssl context = mock(HttpsTrust.Ssl.class);
KeyManagementException cause = new KeyManagementException("foo");
when(context.newFactory(any(TrustManager.class))).thenThrow(cause);