[platform] activation protocol quick fix (IDEA-CR-11401)
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Wed, 15 Jun 2016 09:31:18 +0000 (12:31 +0300)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 15 Jun 2016 09:31:41 +0000 (12:31 +0300)
platform/platform-impl/src/com/intellij/idea/SocketLock.java

index 65082b74d3d872278893eb11caec83010ef46bc6..4851e2a63ee97ff91139b4828e0cdd7ccd89d965 100644 (file)
@@ -370,7 +370,8 @@ public final class SocketLock {
             }
 
             if (StringUtil.startsWith(command, ACTIVATE_COMMAND)) {
-              List<String> args = StringUtil.split(command.subSequence(ACTIVATE_COMMAND.length(), command.length()).toString(), "\0");
+              String data = command.subSequence(ACTIVATE_COMMAND.length(), command.length()).toString();
+              List<String> args = StringUtil.split(data, data.contains("\0") ? "\0" : "\uFFFD");
 
               boolean tokenOK = !args.isEmpty() && myToken.equals(args.get(0));
               if (!tokenOK) {