diff --git a/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/websocket/InboundWebsocketSourceHandler.java b/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/websocket/InboundWebsocketSourceHandler.java index a05f351d15e..559bcdc81d7 100644 --- a/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/websocket/InboundWebsocketSourceHandler.java +++ b/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/websocket/InboundWebsocketSourceHandler.java @@ -101,8 +101,8 @@ public class InboundWebsocketSourceHandler extends ChannelInboundHandlerAdapter private int port; private boolean dispatchToCustomSequence; private InboundWebsocketResponseSender responseSender; - private static ArrayList contentTypes = new ArrayList<>(); - private static ArrayList otherSubprotocols = new ArrayList<>(); + private ArrayList contentTypes = new ArrayList<>(); + private ArrayList otherSubprotocols = new ArrayList<>(); private int clientBroadcastLevel; private String outflowDispatchSequence; private String outflowErrorSequence; @@ -115,20 +115,14 @@ public class InboundWebsocketSourceHandler extends ChannelInboundHandlerAdapter private InboundApiHandler inboundApiHandler = new InboundApiHandler(); private static final AttributeKey> WSO2_PROPERTIES = AttributeKey.valueOf("WSO2_PROPERTIES"); - static { + public InboundWebsocketSourceHandler() throws Exception { contentTypes.add("application/xml"); contentTypes.add("application/json"); contentTypes.add("text/xml"); - } - - static { otherSubprotocols.add("graphql-ws"); otherSubprotocols.add("graphql-transport-ws"); } - public InboundWebsocketSourceHandler() throws Exception { - } - public void setSubprotocolHandlers(ArrayList subprotocolHandlers) { this.subprotocolHandlers = subprotocolHandlers; for (AbstractSubprotocolHandler handler : subprotocolHandlers) {