LinkedList<WorkListItem> workList = new LinkedList<WorkListItem>(); for (String path : project.getFileArray()) { addToWorkList(workList, new WorkListItem(classFactory.createFilesystemCodeBaseLocator(path), true)); } for (String path : project.getAuxClasspathEntryList()) { addToWorkList(workList, new WorkListItem(classFactory.createFilesystemCodeBaseLocator(path), false)); }    while (!workList.isEmpty()) { WorkListItem item = workList.removeFirst();      boolean isAppCodeBase = item.isAppCodeBase();  try {  ICodeBase codeBase = item.getCodeBaseLocator().openCodeBase(); codeBase.setApplicationCodeBase(isAppCodeBase); classPath.addCodeBase(codeBase);     if (codeBase instanceof IScannableCodeBase) { scanCodebase(workList, (IScannableCodeBase) codeBase); }   scanJarManifestForClassPathEntries(workList, codeBase); } catch (IOException e) { if (isAppCodeBase) { throw e; } else {  } } catch (ResourceNotFoundException e) { if (isAppCodeBase) { throw e; } else {  } } }
processWorkList(buildProjectCodebaseList()); processWorkList(buildSystemCodebaseList());
	private void buildClassPath() throws InterruptedException, IOException, ResourceNotFoundException {		// Seed worklist with app codebases and aux codebases.		LinkedList<WorkListItem> workList = new LinkedList<WorkListItem>();		for (String path : project.getFileArray()) {			addToWorkList(workList, new WorkListItem(classFactory.createFilesystemCodeBaseLocator(path), true));		}		for (String path : project.getAuxClasspathEntryList()) {			addToWorkList(workList, new WorkListItem(classFactory.createFilesystemCodeBaseLocator(path), false));		}		// Build the classpath, scanning codebases for nested archives		// and referenced codebases.		while (!workList.isEmpty()) {			WorkListItem item = workList.removeFirst();						// If we are working on an application codebase,			// then failing to open/scan it is a fatal error.			// We issue warnings about problems with aux codebases,			// but continue anyway.			boolean isAppCodeBase = item.isAppCodeBase();			try {				// Open the codebase and add it to the classpath				ICodeBase codeBase = item.getCodeBaseLocator().openCodeBase();				codeBase.setApplicationCodeBase(isAppCodeBase);				classPath.addCodeBase(codeBase);				// If it is a scannable codebase, check it for nested archives.				// In addition, if it is an application codebase then				// make a list of application classes.				if (codeBase instanceof IScannableCodeBase) {					scanCodebase(workList, (IScannableCodeBase) codeBase);				}				// Check for a Jar manifest for additional aux classpath entries.				scanJarManifestForClassPathEntries(workList, codeBase);			} catch (IOException e) {				if (isAppCodeBase) {					throw e;				} else {					// TODO: log warning				}			} catch (ResourceNotFoundException e) {				if (isAppCodeBase) {					throw e;				} else {					// TODO: log warning				}			}		}				if (DEBUG) {			System.out.println("Classpath:");			dumpCodeBaseList(classPath.appCodeBaseIterator(), "Application codebases");			dumpCodeBaseList(classPath.auxCodeBaseIterator(), "Auxiliary codebases");		}	}