I am getting StringIndexOutOfBounds exception in this part of the code.
The field that captures myList is optional in the UI.This error occurs only when myList/myURL string is empty. How do I handle it?
Can someone correct me what am I doing wrong here?
if (myList != null) {
for (int r = 0; r < myList.size(); r++) {
myURL = myURL + myList.toString() + ",";
}
myURL = myURL.substring(0, myrssURL.length() - 1);
myURL = myURL.replace("[", "").replace("]", "");
}
else
{
rssList.clear();
rssURL=null;
System.out.println("inside else >>>>");
}