It says "go through all of the providers and collect all their job postings and add them to the list."
What list? There is no List object in the Controller class.
I thought maybe it meant that the scan() method should return a list? So I wrote it that way:
public List<JobPosting> scan()
{
List<JobPosting> list = new ArrayList<>();
for(Provider provider : providers)
{
Collections.addAll(list, provider.getJavaJobPostings("").toArray());
}
System.out.println(list.size() + " job postings found.");
return list;
}
However there are two issues here. First, the Collections.addAll line is not valid. It says it doesn't recognize the addAll(List<JobPosting>, Java.lang.Object[]) method. So even though the getJavaJobPostings method specifically says that it returns a List<JobPosting> object, turning that list into an array does not assume it to be a JobPosting[] array? Seems very strange.
The other issue is that I don't know what to put for the searchString. Do I just leave it as an empty string for now?