if (codeBase instanceof IScannableCodeBase) { scanCodebase(classPath, workList, (IScannableCodeBase) codeBase);
if (discoveredCodeBase.getCodeBase() instanceof IScannableCodeBase) { scanCodebase(classPath, workList, discoveredCodeBase);
	private void processWorkList(IClassPath classPath, LinkedList<WorkListItem> workList) throws InterruptedException, IOException, ResourceNotFoundException {		// Build the classpath, scanning codebases for nested archives		// and referenced codebases.		while (!workList.isEmpty()) {			WorkListItem item = workList.removeFirst();			if (DEBUG) {				System.out.println("Working: " + item.getCodeBaseLocator());			}						// 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(classPath, workList, (IScannableCodeBase) codeBase);				}				// Check for a Jar manifest for additional aux classpath entries.				scanJarManifestForClassPathEntries(workList, codeBase);			} catch (IOException e) {				if (isAppCodeBase) {					throw e;				} else {					errorLogger.logError("Cannot open codebase " + item.getCodeBaseLocator(), e);				}			} catch (ResourceNotFoundException e) {				if (isAppCodeBase) {					throw e;				} else {					errorLogger.logError("Cannot open codebase " + item.getCodeBaseLocator(), e);				}			}		}	}