Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,25 @@ else if (linesplit.length < 4)
}
else
{
response.add(Page.makePage(
line.charAt(0), //type
linesplit[1],
linesplit[2],
Integer.parseInt(linesplit[3]),
linesplit[0].substring(1) //remove the type tag
));
try
{
// verify the port parses as an integer
int port = Integer.parseInt(linesplit[3].trim());
// add the response
response.add(Page.makePage(
line.charAt(0), //type
linesplit[1],
linesplit[2],
port,
linesplit[0].substring(1) //remove the type tag
));
}
catch (StringIndexOutOfBoundsException | NumberFormatException e)
{
// something went wrong, show an unknown page entry
response.add(new UnknownPage(line));
}

}
}

Expand Down