docs: public boolean checkTopicSyntax(String topic)
  	    throws InvalidTopicSyntaxException
  	  {
  	    checkTopicNotNull(topic);
  	    
  	    char[] chars = topic.toCharArray();
  	    boolean acceptSeparator = true;
  	    // becomes false when hash seen, stays false thereafter
  	    boolean acceptDot = false;
  	    // becomes false when hash seen, stays false thereafter    
  	    boolean acceptStar = true;
  	    // becomes false on non-separator, true on separator
  	    boolean acceptOrdinary = true;
  	    // becomes false on wildcard, true on separator
  	    boolean prevSeparator = false;
  	    // becomes true on separator    
  	    boolean hasWild = false;
  	    for (int i = 0; i < chars.length; i++)
  	    {
  	      char cand = chars[i];
  	      if (cand == MatchSpace.SUBTOPIC_MATCHONE_CHAR)
  	      {
  	        if (acceptStar)
  	        {
  	          hasWild = true;
  	          acceptStar = acceptOrdinary = prevSeparator = acceptDot = false;
  	          acceptSeparator = true;
  	        }
  	        else
  	          throw new InvalidTopicSyntaxException(
  	            NLS.format(
  	              "INVALID_TOPIC_ERROR_CWSIH0001",
  	               new Object[] { topic, new Integer(i+1) }));
  	      }
  	      else if (cand == MatchSpace.SUBTOPIC_STOP_CHAR)
  	      {
  	        if (acceptDot)
  	        {
  	          if(prevSeparator)
  	          {
  	            acceptOrdinary = false;
  	          }
  	          else
  	          {
  	            acceptOrdinary = true;
  	          }
  	          acceptStar = prevSeparator = acceptDot = false;
  	          acceptSeparator = true;
  	        }
  	        else
  	          throw new InvalidTopicSyntaxException(
  	            NLS.format(
  	              "INVALID_TOPIC_ERROR_CWSIH0002",
  	               new Object[] { topic, new Integer(i+1) }));
  	      }
  	      else if (cand == MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
  	      {
  	        if (acceptSeparator)
  	        {
  	          // A separator is disallowed at the end of a publication
  	          if(i == chars.length - 1)
  	          {
  	            throw new InvalidTopicSyntaxException(
  	                NLS.format(
  	                  "INVALID_TOPIC_ERROR_CWSIH0003",
  	                  new Object[] { topic, new Integer(i+1) }));           
  	          }
  	          
  	          if(prevSeparator)
  	          {
  	            // We've found a '//' 
  	            acceptSeparator = false;
  	            hasWild = true;
  	            acceptDot = true;
  	          }
  	          else // First separator
  	          {
  	            acceptStar = acceptOrdinary = prevSeparator = true;
  	            acceptDot = true;
  	          }
  	        }
  	        else
  	          // Three separators together
  	          throw new InvalidTopicSyntaxException(
  	            NLS.format(
  	              "INVALID_TOPIC_ERROR_CWSIH0003",
  	              new Object[] { topic, new Integer(i+1) }));
  	      }
  	      else if( cand == ':')
  	      {
  	        // :'s are disallowed in topic name parts
  	        throw new InvalidTopicSyntaxException(
  	           NLS.format(
  	             "TEMPORARY_CWSIH9999",
  	             new Object[] { " ':' characters are not allowed in topics. A ':' was found at character " + (i+1) }));
  	      }      
  	      else // Ordinary character
  	      {
  	        if (!acceptOrdinary)
  	           throw new InvalidTopicSyntaxException(
  	             NLS.format(
  	               "INVALID_TOPIC_ERROR_CWSIH0004",
  	               new Object[] { topic, new Integer(i+1) }));
  	        else
  	        {
  	          acceptStar = prevSeparator = false;
  	          acceptSeparator = acceptDot = true;
  	        }
  	      }
  	    }
  	    return hasWild;
  	  }