I am taking the request parameters from the front-end web app and displaying the result accordingly.
Map<String,Object> requestparms
testObj.setUserId(requestparms.get("userId") == null ? null :requestparms.get("userId").toString());
When I test using the restClient I get the following error :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error incidentId="22854566" correlationId="922f4150-4636-4b94-8ac6-71f8ed1935c1">
<exceptionMessage>[Ljava.lang.String; incompatible with java.lang.String</exceptionMessage>
</error>
I tried
String userId = String.valueOf(requestparms.get("userId"));
System.out.println("The value of variable is " +userId);
Still the same error.
Can you someone please with help information related to it ?
Thank you in advance, Lucky
String[]
instead of aString
.