Author: jonesde
Date: Wed Jun 27 17:10:54 2007
New Revision: 551411
URL:
http://svn.apache.org/viewvc?view=rev&rev=551411Log:
Changed this to fix an NPE when the post() method with no arguments is called
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/HttpClient.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/HttpClient.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/HttpClient.java?view=diff&rev=551411&r1=551410&r2=551411==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/HttpClient.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/HttpClient.java Wed Jun 27 17:10:54 2007
@@ -451,8 +451,10 @@
DataOutputStream out = new DataOutputStream(con.getOutputStream());
if (Debug.verboseOn() || debug) Debug.log("Opened output stream", module);
- out.writeBytes(arguments);
- if (Debug.verboseOn() || debug) Debug.log("Wrote arguements (parameters) : " + arguments, module);
+ if (arguments != null) {
+ out.writeBytes(arguments);
+ if (Debug.verboseOn() || debug) Debug.log("Wrote arguements (parameters) : " + arguments, module);
+ }
out.flush();
out.close();