Skip to content

Commit

Permalink
Merge pull request #75 from welsh/master
Browse files Browse the repository at this point in the history
Adjusted order to avoid invalid warning about TrustEverythingTrustManager
  • Loading branch information
michaelklishin committed Jan 30, 2019
2 parents 7d0743e + 4398ab8 commit 7e3ae71
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ protected Connection createConnection(String username, String password, Connecti
this.username = username;
this.password = password;
com.rabbitmq.client.ConnectionFactory cf = createConnectionFactory();
setRabbitUri(logger, this, cf, getUri());
maybeEnableTLS(cf);
setRabbitUri(logger, this, cf, getUri());
maybeEnableHostnameVerification(cf);
cf.setMetricsCollector(this.metricsCollector);

Expand Down Expand Up @@ -332,6 +332,7 @@ public void setUri(String uriString) throws JMSException {
if (uriString != null && !uriString.trim().isEmpty()) {
// Create a temp factory and set the properties by uri
com.rabbitmq.client.ConnectionFactory factory = createConnectionFactory();
// Generates a TrustEverythingTrustManager warning which can be ignored as the SSLContext is not copied over
setRabbitUri(logger, this, factory, uriString);
// Now extract our properties from this factory, leaving the rest unchanged.
this.host = factory.getHost();
Expand Down

0 comments on commit 7e3ae71

Please sign in to comment.