}
}
}
final List<CucumberFeature> cucumberFeatures = new ArrayList<CucumberFeature>();
final FeatureBuilder builder = new FeatureBuilder(cucumberFeatures);
final List<Object> filters = createFilters(testInstance);
final InputStream featuresIs = tccl.getResourceAsStream(ClientServerFiles.FEATURES_LIST);
if (featuresIs != null) {
final BufferedReader reader = new BufferedReader(new InputStreamReader(featuresIs));
String line;
while ((line = reader.readLine()) != null) {
line = line.trim();
if (line.isEmpty()) {
continue;
}
final Set<Object> resourceFilters = new HashSet<Object>(filters);
final PathWithLines pathWithLines = new PathWithLines(line);
resourceFilters.addAll(pathWithLines.lines);
builder.parse(new ClassLoaderResource(tccl, pathWithLines.path), new ArrayList<Object>(resourceFilters));
}
} else { // client side
for (final Map.Entry<String, Collection<URL>> entry : Features.createFeatureMap(CucumberConfiguration.instance().getTempDir(), cukespaceConfig.getProperty(CucumberConfiguration.FEATURE_HOME), clazz, tccl).entrySet()) {
final PathWithLines pathWithLines = new PathWithLines(entry.getKey());
final Set<Object> resourceFilters = new HashSet<Object>(filters);
resourceFilters.addAll(pathWithLines.lines);
for (final URL url : entry.getValue()) {
builder.parse(new URLResource(pathWithLines.path, url), new ArrayList<Object>(resourceFilters));
}
}
}
if (cucumberFeatures.isEmpty()) {