|
|
|
@ -85,10 +85,10 @@ public final class Protocol {
|
|
|
|
|
|
|
|
|
|
public static volatile int commandMappingSize = 0; |
|
|
|
|
|
|
|
|
|
public static synchronized void initCommandMapping(Map<String, String> mapping) { |
|
|
|
|
public static synchronized void initCommandMapping(final Map<String, String> mapping) { |
|
|
|
|
|
|
|
|
|
commandMapping.clear(); |
|
|
|
|
for (Map.Entry<String, String> entry : mapping.entrySet()) { |
|
|
|
|
for (final Map.Entry<String, String> entry : mapping.entrySet()) { |
|
|
|
|
ProtocolCommand defaultCommand = Command.fromName(entry.getKey()); |
|
|
|
|
if (defaultCommand != null) { |
|
|
|
|
commandMapping.put(defaultCommand, new ProtocolCommand() { |
|
|
|
|