Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
String archiveUri = getAbstractArchiveUri(descriptor);
Iterator entries;
try{
entries=getClassNames(descriptor).iterator();
} catch(Exception e) {
// e.printStackTrace();
result.failed(smh.getLocalString(getClass().getName() + ".exception",
"Error: [ {0} ] exception while loading the archive [ {1} ].",
new Object[] {e, descriptor.getName()}));
return result;
}
boolean allPassed = true;
ClosureCompiler closureCompiler=getVerifierContext().getClosureCompiler();
((ClosureCompilerImpl)closureCompiler).addExcludedPattern("org.apache.jasper");
if(getVerifierContext().isAppserverMode())
((ClosureCompilerImpl)closureCompiler).addExcludedPattern("com.sun.enterprise");
while (entries.hasNext()) {
String className=(String)entries.next();
boolean status=closureCompiler.buildClosure(className);
allPassed=status && allPassed;
}
if (allPassed) {
result.setStatus(Result.PASSED);
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"All the classes are loadable within [ {0} ] without any linkage error.",
new Object[] {archiveUri}));
} else {
result.setStatus(Result.FAILED);
addErrorDetails(result, compName);
result.addErrorDetails(WebArchiveLoadableHelper.getFailedResults(closureCompiler, getVerifierContext().getOutDir()));
result.addErrorDetails(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.loadableError",
"Please either bundle the above mentioned classes in the application " +
"or use optional packaging support for them."));
}
return result;