File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/org/java_websocket/protocols Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3434 */
3535public class Protocol implements IProtocol {
3636
37- private static final Pattern COMPILE = Pattern .compile (" " );
38- private static final Pattern PATTERN = Pattern .compile ("," );
37+ private static final Pattern patternSpace = Pattern .compile (" " );
38+ private static final Pattern patternComma = Pattern .compile ("," );
3939
4040 /**
4141 * Attribute for the provided protocol
@@ -56,8 +56,8 @@ public Protocol( String providedProtocol ) {
5656
5757 @ Override
5858 public boolean acceptProvidedProtocol ( String inputProtocolHeader ) {
59- String protocolHeader = COMPILE .matcher (inputProtocolHeader ).replaceAll ("" );
60- String [] headers = PATTERN .split (protocolHeader );
59+ String protocolHeader = patternSpace .matcher (inputProtocolHeader ).replaceAll ("" );
60+ String [] headers = patternComma .split (protocolHeader );
6161 for ( String header : headers ) {
6262 if ( providedProtocol .equals ( header ) ) {
6363 return true ;
You can’t perform that action at this time.
0 commit comments