Simplify Connection Configuration#1
Conversation
| */ | ||
| public ContextProperties(Properties properties, String context) { | ||
| super(properties); | ||
| this.context = context + '.'; |
There was a problem hiding this comment.
Should we really manipulate a context we get as an input param?
There was a problem hiding this comment.
The idea is that you don't need to suffix your context by ., which would most likely always be the case as . is the default delimiter for property names (at least in our libs). How about a Removed the setContextDelimiter()?..
| /** | ||
| * Created by tgdpaad2 on 15/02/17. | ||
| */ | ||
| public class PropertyUtil { |
There was a problem hiding this comment.
Add missing javadoc for PropertyUtil class
| */ | ||
| public JmsBuilder connectionFactory(ConnectionFactory connectionFactory) { | ||
| this.connectionFactory = connectionFactory; | ||
| return (JmsBuilder) this; |
There was a problem hiding this comment.
we should try to avoid unchecked casts when returning 'this'.
There was a problem hiding this comment.
same in class QueueConnection
There was a problem hiding this comment.
The only solution I found is this one: http://stackoverflow.com/questions/17164375/subclassing-a-java-builder-class/34741836#34741836. I wasn't really happy with this either.
What do you vote for, getThis() or unchecked casts?
|
In general we should use the modifiers 'static final' for constants (normally written in capital letters) |
This PR simplifies the RabbitMQ and JMS strategies by the following changes:
Propertiesinstance.