public ConditionInfo(String encodedCondition) { if (encodedCondition == null) { throw new NullPointerException("missing encoded permission"); } if (encodedCondition.length() == 0) { throw new IllegalArgumentException("empty encoded permission"); }  try { char[] encoded = encodedCondition.toCharArray();   if (encoded[0] != '[') { throw new IllegalArgumentException( "first character not open bracket"); }   int end = 1; int begin = end;  while ((encoded[end] != ' ') && (encoded[end] != ')')) { end++; }  if (end == begin) { throw new IllegalArgumentException("expecting type"); }  this.type = new String(encoded, begin, end - begin);  Vector args = new Vector();  while (encoded[end] == ' ') { end++;  if (encoded[end] != '"') { throw new IllegalArgumentException("expecting quoted name"); }  end++; begin = end;  while (encoded[end] != '"') { if (encoded[end] == '\\') { end++; }  end++; }  args.add(decodeString(encoded, begin, end)); end++; } this.args = (String[]) args.toArray(new String[0]);  if ((encoded[end] != ']') || (end + 1 != encoded.length)) { throw new IllegalArgumentException("last character not " + "close bracket"); } } catch (ArrayIndexOutOfBoundsException e) { throw new IllegalArgumentException("parsing terminated abruptly");
public ConditionInfo(String type, String args[]) { this.type = type; this.args = args; if (type == null) { throw new NullPointerException("type is null");
	public ConditionInfo(String encodedCondition) {		if (encodedCondition == null) {			throw new NullPointerException("missing encoded permission");		}		if (encodedCondition.length() == 0) {			throw new IllegalArgumentException("empty encoded permission");		}		try {			char[] encoded = encodedCondition.toCharArray();			/* the first character must be '[' */			if (encoded[0] != '[') {				throw new IllegalArgumentException(						"first character not open bracket");			}			/* type is not quoted or encoded */			int end = 1;			int begin = end;			while ((encoded[end] != ' ') && (encoded[end] != ')')) {				end++;			}			if (end == begin) {				throw new IllegalArgumentException("expecting type");			}			this.type = new String(encoded, begin, end - begin);			Vector args = new Vector();			/* type may be followed by name which is quoted and encoded */			while (encoded[end] == ' ') {				end++;				if (encoded[end] != '"') {					throw new IllegalArgumentException("expecting quoted name");				}				end++;				begin = end;				while (encoded[end] != '"') {					if (encoded[end] == '\\') {						end++;					}					end++;				}				args.add(decodeString(encoded, begin, end));				end++;			}			this.args = (String[]) args.toArray(new String[0]);			/* the final character must be ')' */			if ((encoded[end] != ']') || (end + 1 != encoded.length)) {				throw new IllegalArgumentException("last character not "						+ "close bracket");			}		} catch (ArrayIndexOutOfBoundsException e) {			throw new IllegalArgumentException("parsing terminated abruptly");		}	}