Skip to content

Commit

Permalink
remove static from subprotocols and content types to fix ConcurrentMo…
Browse files Browse the repository at this point in the history
…dificationException
  • Loading branch information
Lakith-Rambukkanage committed Aug 17, 2023
1 parent eb14d64 commit 1db08d3
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public class InboundWebsocketSourceHandler extends ChannelInboundHandlerAdapter
private int port;
private boolean dispatchToCustomSequence;
private InboundWebsocketResponseSender responseSender;
private static ArrayList<String> contentTypes = new ArrayList<>();
private static ArrayList<String> otherSubprotocols = new ArrayList<>();
private ArrayList<String> contentTypes = new ArrayList<>();
private ArrayList<String> otherSubprotocols = new ArrayList<>();
private int clientBroadcastLevel;
private String outflowDispatchSequence;
private String outflowErrorSequence;
Expand All @@ -115,20 +115,14 @@ public class InboundWebsocketSourceHandler extends ChannelInboundHandlerAdapter
private InboundApiHandler inboundApiHandler = new InboundApiHandler();
private static final AttributeKey<Map<String, Object>> 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<AbstractSubprotocolHandler> subprotocolHandlers) {
this.subprotocolHandlers = subprotocolHandlers;
for (AbstractSubprotocolHandler handler : subprotocolHandlers) {
Expand Down

0 comments on commit 1db08d3

Please sign in to comment.