-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-970: Add AmqpAppender.verifyHostname
option
#971
Conversation
Fixes spring-projects#970 * Some code polishing and internal refactoring for `AmqpAppender` **Cherry-pick to 2.1.x**
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the Log4j2 appender?
Also
Task :spring-rabbit:checkstyleMain
[ant:checkstyle] [ERROR] /home/travis/build/spring-projects/spring-amqp/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/logback/AmqpAppender.java:24:8: Unused import - java.util.Optional. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/spring-projects/spring-amqp/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/logback/AmqpAppender.java:403:24: Reference to instance variable 'verifyHostname' needs "this.". [RequireThis]
@@ -620,7 +641,7 @@ public void start() { | |||
if (rabbitConnectionFactory != null) { | |||
super.start(); | |||
this.routingKeyLayout.setPattern(this.routingKeyLayout.getPattern() | |||
.replaceAll("%property\\{applicationId\\}", this.applicationId)); | |||
.replaceAll("%property\\{applicationId}", this.applicationId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong, curly brackets must be escaped in RegEx.
Isn't there a test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add `verifyHostname` to the Log4J `AmqpAppender` * Document `verifyHostname` option
I failed to cherry-pick this; 462efc4 |
OK. I'll do that myself later or issue a back-port PR. |
Wait. Looks like you have figured that out: 462efc4 Thanks |
Sorry, yes; the link to the cherry pick was in my comment; I should have made that clear. |
Fixes #970
AmqpAppender
Cherry-pick to 2.1.x