Author: adrianc
Date: Tue Mar 29 19:49:26 2011
New Revision: 1086701
URL:
http://svn.apache.org/viewvc?rev=1086701&view=revLog:
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.
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1086701&r1=1086700&r2=1086701&view=diff==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Tue Mar 29 19:49:26 2011
@@ -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)) {