I have the following situation, where my program terminates with a NullPointerException during the function. What can I do to make this function work?
UPDATE
else if (str == null)
emptyLinks.add(newPageLinks.get(i).getText() + "at link: " + str);