code: public static void checkRole(String roleName) {
  
      if (roleName.length() > 255)
        throw new VOMSError("roleName.length()>255");
  
      if (!rolePattern.matcher(roleName).matches())
        throw new VOMSError("Syntax error in role name: " + roleName);
    }
docs: This methods checks that the string passed as argument complies with the
  syntax used by voms to identify roles.
  
  
  @param roleName
  the name of the role
  @throws VOMSError
  If the string passed as argument doens not comply with the voms
  sytax.