String protocol = getURLProtocol(fileName);
String protocol = URLClassPath.getURLProtocol(fileName);
	private void scanArchiveOrDirectory(ArchiveWorkListItem item,			LinkedList<ArchiveWorkListItem> archiveWorkList, List<String> repositoryClassList,			List<String> additionalAuxClasspathEntryList)	        throws IOException, InterruptedException {		String fileName = item.getFileName();		ClassProducer classProducer = null;		try {			// Create a URL for the filename.			// The protocol defaults to "file" if not explicitly			// specified in the filename.			String protocol = getURLProtocol(fileName);			if (protocol == null) {				protocol = "file";				fileName = "file:" + fileName;			}			URL url = new URL(fileName);			// Figure out the file extension			String fileExtension = null;			int lastDot = fileName.lastIndexOf('.');			if (lastDot >= 0) {				fileExtension = fileName.substring(lastDot);			}			// Create the ClassProducer			if (fileExtension != null && isArchiveExtension(fileExtension))				classProducer = new ZipClassProducer(url, archiveWorkList, additionalAuxClasspathEntryList);			else if (fileExtension != null && fileExtension.equals(".class"))				classProducer = new SingleClassProducer(url);			else if (protocol.equals("file")) {				// Assume it's a directory				fileName = fileName.substring("file:".length());				File dir = new File(fileName);				if (!dir.isDirectory())					throw new IOException("Path " + fileName + " is not an archive, class file, or directory");				classProducer = new DirectoryClassProducer(fileName, additionalAuxClasspathEntryList);			} else				throw new IOException("URL " + fileName + " is not an archive, class file, or directory");			// Load all referenced classes into the Repository			for (; ;) {				if (Thread.interrupted())					throw new InterruptedException();				try {					JavaClass jclass = classProducer.getNextClass();					if (jclass == null)						break;					if (DEBUG) System.out.println("Scanned " + jclass.getClassName());					Repository.addClass(jclass);					repositoryClassList.add(jclass.getClassName());				} catch (ClassFormatException e) {					if (DEBUG) e.printStackTrace();					bugReporter.logError("Invalid classfile format", e);				}			}			if (item.isExplicit())				progressCallback.finishArchive();			// If the archive or directory scanned contained source files,			// add it to the end of the source path.			if (classProducer.containsSourceFiles())				project.addSourceDir(fileName);		} catch (IOException e) {			// You'd think that the message for a FileNotFoundException would include			// the filename, but you'd be wrong.  So, we'll add it explicitly.			throw new IOException("Could not analyze " + fileName + ": " + e.getMessage());		} finally {			if (classProducer != null) {				classProducer.close();			}		}	}