The environment entry name must be of finite length.
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
boolean oneFailed = false;
EnvironmentProperty nextEnvironmentProperty;
String envName;
if (!descriptor.getEnvironmentProperties().isEmpty()) {
for (Iterator itr = descriptor.getEnvironmentProperties().iterator();
itr.hasNext();) {
nextEnvironmentProperty = (EnvironmentProperty) itr.next();
envName = nextEnvironmentProperty.getName();
if (envName.length() > 0) {
result.addGoodDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.addGoodDetails
(smh.getLocalString
(getClass().getName() + ".passed",
"Environment entry value [ {0} ] has valid name within web archive [ {1} ]",
new Object[] {nextEnvironmentProperty.getName(),descriptor.getName()}));
} else {
oneFailed = true;
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.addErrorDetails
(smh.getLocalString
(getClass().getName() + ".failed",
"Error: Environment entry name must be of finite length"));
}
}
if (!oneFailed){
result.setStatus(Result.PASSED);
} else {
result.setStatus(Result.FAILED);
}
} else {
result.setStatus(Result.NOT_APPLICABLE);
result.addNaDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.notApplicable(smh.getLocalString
(getClass().getName() + ".notApplicable",
"There are no environment entry elements defined within this web archive [ {0} ]",
new Object[] {descriptor.getName()}));
}
return result;