ARTEMIS-752 fixing NPE
Done as a patch on https://issues.apache.org/jira/browse/ARTEMIS-752
This commit is contained in:
parent
cc6ded96d8
commit
f8038268e0
|
@ -144,11 +144,13 @@ public class OsgiBroker {
|
|||
private String[] getRequiredProtocols(Set<TransportConfiguration> acceptors) {
|
||||
ArrayList<String> protocols = new ArrayList<>();
|
||||
for (TransportConfiguration acceptor : acceptors) {
|
||||
String protocolsFromAcceptor = acceptor.getParams().get(TransportConstants.PROTOCOLS_PROP_NAME).toString();
|
||||
String[] protocolsSplit = protocolsFromAcceptor.split(",");
|
||||
for (String protocol : protocolsSplit) {
|
||||
if (!protocol.contains(protocol)) {
|
||||
protocols.add(protocol);
|
||||
Object protocolsFromAcceptor = acceptor.getParams().get(TransportConstants.PROTOCOLS_PROP_NAME);
|
||||
if (protocolsFromAcceptor != null) {
|
||||
String[] protocolsSplit = protocolsFromAcceptor.toString().split(",");
|
||||
for (String protocol : protocolsSplit) {
|
||||
if (!protocols.contains(protocol)) {
|
||||
protocols.add(protocol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue