負荷を作成しているときに、プログラムで以下のエラーが発生します。
D:\views\UniqueAcctStorageRuleNameValidator.java:34: illegal start of type
List<String> listOfAcctStorageRuleNameAsArray =
new ArrayList<>(listOfAcctStorageRuleName.size());
コードは次のとおりです。
public class FKAcctStorageRuleNameValidator extends AbstractAnnotationCheck<FKAcctStorageRuleName>{
private static final long serialVersionUID = 1L;
private SpecbookValidatorManager specBookValidator;
@Override
public boolean isSatisfied(Object validatedObject, Object valueToValidate,
OValContext context, Validator validator) throws OValException {
if (valueToValidate == null) return true;
specBookValidator = SpecbookValidatorManagerImpl.getInstance();
List<SpecbookAcctStorageRule> listOfAcctStorageRuleName = specBookValidator.getAcctStorageRuleList();
List<String> listOfAcctStorageRuleNameAsArray = new ArrayList<>(listOfAcctStorageRuleName.size());
for (SpecbookAcctStorageRule specbookAcctStorageRule : listOfAcctStorageRuleName) {
listOfAcctStorageRuleNameAsArray.add(specbookAcctStorageRule.getName());
}
return ListUtil.containsIgnoreCase((String) valueToValidate, listOfAcctStorageRuleNameAsArray);
}
}