Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Null pointer in links #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ public String execute(final HttpMethod method,
}
// Calling this method recursively results in hang, so just retry once.
response = restTemplate.execute(requestUri, method, helper, helper);
} catch(RuntimeException re) {
LOG.error(re.getMessage(), re);
throw re;
} finally {
restTemplate.setErrorHandler(origErrHandler);
}
Expand Down Expand Up @@ -615,7 +618,7 @@ private RequestHelper(Object body, MediaType contentType) {

contextCmds.variables.put("responseBody", lastResult);

if(lastResult instanceof Map && ((Map)lastResult).containsKey("links")) {
if(lastResult instanceof Map && ((Map)lastResult).containsKey("links") && ((Map)lastResult).get("links") != null) {
Links linksobj;
if(contextCmds.variables.containsKey("links")) {
linksobj = (Links)contextCmds.variables.get("links");
Expand Down