try { vec = new Vector(); RandomAccessFile servletFile = null;  servletFile = new RandomAccessFile(inputFile, "r"); while (true) { String isrv = servletFile.readLine();  if (isrv == null) { break; } isrv = isrv.trim(); if (isrv.startsWith("#") || isrv.equals("")) continue; ServletListRecord servletRecord = parseServletLine(isrv); vec.add(servletRecord); } servletFile.close();  } catch (IOException e) { if (log.isErrorEnabled()) { log.error("Error during read/open from file: " + inputFile, e);
vec = new Vector(); if (inputFile != null) { try { RandomAccessFile servletFile = null;  servletFile = new RandomAccessFile(inputFile, "r"); while (true) { String isrv = servletFile.readLine();  if (isrv == null) { break; } isrv = isrv.trim(); if (isrv.startsWith("#") || isrv.equals("")) continue; ServletListRecord servletRecord = parseServletLine(isrv); vec.add(servletRecord); } servletFile.close(); } catch (IOException e) { if (log.isErrorEnabled()) { log.error("Error during read/open from file: " + inputFile, e); }
  private Vector getServletList() {    Vector vec = null;    ConfigFinder cf = ConfigFinder.getInstance();    File inputFile = null;    try {      inputFile = cf.locateFile("servlets.txt");    } catch(Exception e) {      if (log.isErrorEnabled()) {	log.error("Could not read servlets file.", e);      }    }     if (vec == null) {      try {         vec = new Vector();        RandomAccessFile servletFile = null;        // read servlets, one per line        servletFile = new RandomAccessFile(inputFile, "r");              while (true) {          String isrv = servletFile.readLine(); // get servlet line	  // Skip comment lines          if (isrv == null) {            break;          }          isrv = isrv.trim();	  if (isrv.startsWith("#") || isrv.equals(""))	    continue;          ServletListRecord servletRecord = parseServletLine(isrv);          vec.add(servletRecord);        }        servletFile.close();      } catch (IOException e) {	if (log.isErrorEnabled()) {	  log.error("Error during read/open from file: " + inputFile, e);	}      }    }    return vec;      }