private static int parseLine(Class<?> service,URL u,BufferedReader r,int lc,List<String> names,Set<String> returned) throws IOException, ServiceConfigurationError {
  String ln=r.readLine();
  if (ln == null) {
    return -1;
  }
  int ci=ln.indexOf('#');
  if (ci >= 0)   ln=ln.substring(0,ci);
  ln=ln.trim();
  int n=ln.length();
  if (n != 0) {
    if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))     fail(service,u,lc,"Illegal configuration-file syntax");
    int cp=ln.codePointAt(0);
    if (!Character.isJavaIdentifierStart(cp))     fail(service,u,lc,"Illegal provider-class name: " + ln);
    for (int i=Character.charCount(cp); i < n; i+=Character.charCount(cp)) {
      cp=ln.codePointAt(i);
      if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))       fail(service,u,lc,"Illegal provider-class name: " + ln);
    }
    if (!returned.contains(ln)) {
      names.add(ln);
      returned.add(ln);
    }
  }
  return lc + 1;
}

private static int parseLine ( Class < ? > service , URL u , BufferedReader r , int lc , List < String > names , Set < String > returned ) throws IOException , ServiceConfigurationError { String ln = r . readLine ( ) ; if ( ln == null ) { return - 1 ; } int ci = ln . indexOf ( '#' ) ; if ( ci >= 0 ) ln = ln . substring ( 0 , ci ) ; ln = ln . trim ( ) ; int n = ln . length ( ) ; if ( n != 0 ) { if ( ( ln . indexOf ( ' ' ) >= 0 ) || ( ln . indexOf ( '\t' ) >= 0 ) ) fail ( service , u , lc , "Illegal configuration-file syntax" ) ; int cp = ln . codePointAt ( 0 ) ; if ( ! Character . isJavaIdentifierStart ( cp ) ) fail ( service , u , lc , "Illegal provider-class name: " + ln ) ; for ( int i = Character . charCount ( cp ) ; i < n ; i += Character . charCount ( cp ) ) { cp = ln . codePointAt ( i ) ; if ( ! Character . isJavaIdentifierPart ( cp ) && ( cp != '.' ) ) fail ( service , u , lc , "Illegal provider-class name: " + ln ) ; } if ( ! returned . contains ( ln ) ) { names . add ( ln ) ; returned . add ( ln ) ; } } return lc + 1 ; }
parse a single line from the given configuration file , adding the name on the line to both the names list and the returned set iff the name is not already a member of the returned set .
