Skip to content

Commit 157bdd0

Browse files
David Welshacogoluegnes
authored andcommitted
Adjusted order to avoid invalid warning about TrustEverythingTrustManager
(cherry picked from commit 4398ab8)
1 parent bc28a8e commit 157bdd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/rabbitmq/jms/admin/RMQConnectionFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ protected Connection createConnection(String username, String password, Connecti
274274
this.username = username;
275275
this.password = password;
276276
com.rabbitmq.client.ConnectionFactory cf = createConnectionFactory();
277-
setRabbitUri(logger, this, cf, getUri());
278277
maybeEnableTLS(cf);
278+
setRabbitUri(logger, this, cf, getUri());
279279
maybeEnableHostnameVerification(cf);
280280
cf.setMetricsCollector(this.metricsCollector);
281281
if (this.amqpConnectionFactoryPostProcessor != null) {
@@ -384,6 +384,7 @@ public void setUri(String uriString) throws JMSException {
384384
if (uriString != null && !uriString.trim().isEmpty()) {
385385
// Create a temp factory and set the properties by uri
386386
com.rabbitmq.client.ConnectionFactory factory = createConnectionFactory();
387+
// Generates a TrustEverythingTrustManager warning which can be ignored as the SSLContext is not copied over
387388
setRabbitUri(logger, this, factory, uriString);
388389
// Now extract our properties from this factory, leaving the rest unchanged.
389390
this.host = factory.getHost();

0 commit comments

Comments
 (0)