if (method != null) {
Profiles profiles = method.getAnnotation(Profiles.class);
if (profiles != null) {
String[] profileNames = profiles.value();
if (profileNames != null && profileNames.length > 0) {
validator.disableAllProfiles();
if (LOG.isDebugEnabled()) {
LOG.debug("Enabling profiles [#0]", StringUtils.join(profileNames, ","));
}
for (String profileName : profileNames)
validator.enableProfile(profileName);