Commit e6887671 authored by Martti Käärik's avatar Martti Käärik
Browse files

NPE fixes in HTTP adapter.

parent edd0401d
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -9,4 +9,10 @@ public class HttpRequestData {
	public List<HttpHeader> headers = new ArrayList<>();
	public List<HttpRequestParameter> parameters = new ArrayList<>();
	public Object body;
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.method + " " + this.uri + " HTTP";
	}
}
+5 −0
Original line number Diff line number Diff line
@@ -7,4 +7,9 @@ public class HttpResponseData {
	public String statusMessage;
	public List<HttpHeader> headers;
	public Object body;
	
	@Override
	public String toString() {
		return "HTTP " + this.status + (this.statusMessage != null ? " " + this.statusMessage : "");
	}
}
+4 −2
Original line number Diff line number Diff line
@@ -364,7 +364,8 @@ public class HttpSystemAdapter implements SystemAdapter {
			do {
				for (HttpInput i : unhandledInputs)
					if (i.connection.equals(connection))
						if (i.target.componentName.equals(target.getName())) {
						// If input target is null then we assume default endpoint
						if (i.target == null || i.target.componentName.equals(target.getName())) {
							input = i;
							break;
						}
@@ -389,6 +390,7 @@ public class HttpSystemAdapter implements SystemAdapter {
				try {
					
					// This is not provided by HttpResponse
					if (expectedHttpData != null)
						expectedHttpData.statusMessage = null;

					HttpResponseData receivedHttpData = new HttpResponseData();