Repository: activemq-artemis Updated Branches: refs/heads/master cc6ded96d -> f6f633123
ARTEMIS-752 fixing NPE Done as a patch on https://issues.apache.org/jira/browse/ARTEMIS-752 Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f8038268 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f8038268 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f8038268 Branch: refs/heads/master Commit: f8038268e0699c7d9726b433cec6aa830df68ec2 Parents: cc6ded9 Author: Benjamin Graf <> Authored: Wed Oct 5 11:40:07 2016 -0400 Committer: Clebert Suconic <clebertsuco...@apache.org> Committed: Wed Oct 5 11:40:10 2016 -0400 ---------------------------------------------------------------------- .../org/apache/activemq/artemis/osgi/OsgiBroker.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f8038268/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java ---------------------------------------------------------------------- diff --git a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java index e921768..c478096 100644 --- a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java +++ b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java @@ -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); + } } } }