if (ch == SEPARATOR)
{
currentPart++;
if (currentPart >= parts.length)
{
throw new JMSRuntimeException("Invalid message queue name: " + queueName);
}
continue;
}
if (ch == '\\')
{
if (pos >= queueName.length())
{
throw new JMSRuntimeException("Invalid message queue name: " + queueName);
}
ch = queueName.charAt(pos);
pos++;
}
parts[currentPart].append(ch);
}
if (currentPart != 1)
{
throw new JMSRuntimeException("Invalid message queue name: " + queueName);
}
Pair<String, String> pair = new Pair<String, String>(parts[0].toString(), parts[1].toString());
return pair;