Skip to content
Snippets Groups Projects
Commit 5f6c892d authored by ics's avatar ics
Browse files

Corrected unexpected empty string in ChatEvent.formatEndPoint

parent 74dacd7d
Branches
No related tags found
No related merge requests found
......@@ -91,7 +91,10 @@ public class ChatEvent {
public static String formatEndPoint(String endPoint) {
String formattedEndPoint = endPoint.replace("tcp://", "");
formattedEndPoint = formattedEndPoint.substring(0, formattedEndPoint.indexOf(":"));
int index = formattedEndPoint.indexOf(":");
if (index != -1) {
formattedEndPoint = formattedEndPoint.substring(0, index);
}
return formattedEndPoint;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment