if ("[".equals(token)) {
String sindex = tokens.nextToken();
int idx = Integer.parseInt(sindex);
token = tokens.nextToken();
if (!"]".equals(token)) {
throw new ValidationException(
"']' missing, invalid property format: " + propertyPath);
}
useIndexedValue(idx);
resolveMetaBean();
} else if (!".".equals(token)) { // it is a property name
MetaProperty mp = getMetaBean().getProperty(token);
if (mp == null) {
throw new UnknownPropertyException(
"unknown property '" + token + "' in " + getMetaBean().getId());
}
if (getValue() != null) {
setValue(PropertyAccess.getProperty(getValue(), token));
}
setMetaProperty(mp);
resolveMetaBean();
}
}
} catch (ValidationException ex) {
throw ex; // route exception
} catch (Exception ex) { // wrap exception
throw new ValidationException(
"invalid property format: " + propertyPath, ex);
}
}