Start.java bug fix: Exception is thrown if a string is entered that doesn't contain a ':'. Patch contributed by Chris Snow - https://issues.apache.org/jira/browse/OFBIZ-4237.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1086701 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrian Crum
2011-03-29 19:49:26 +00:00
parent 2b9cf0c882
commit 5cb181e8fa
@@ -287,8 +287,8 @@ public class Start {
try {
reader = new BufferedReader(new InputStreamReader(client.getInputStream()));
String request = reader.readLine();
if (request != null) {
writer = new PrintWriter(client.getOutputStream(), true);
writer = new PrintWriter(client.getOutputStream(), true);
if (request != null && !request.isEmpty() && request.contains(":")) {
String key = request.substring(0, request.indexOf(':'));
String command = request.substring(request.indexOf(':') + 1);
if (key.equals(config.adminKey)) {