code: public static boolean isValidJmxPropertyValue(String s) {
          if ((s.indexOf(":") >= 0)
              || (s.indexOf("*") >= 0)
              || (s.indexOf('"') >= 0)
              || (s.indexOf("?") >= 0)
              || (s.indexOf(",") >= 0)
              || (s.indexOf("=") >= 0)) {
              return false;
          } else
              return true;
      }
docs: Does the specified string contain characters valid in a JMX key property?
  
  @param s the string to be checked
  @return boolean if true, indicates the string is valid, otherwise false