I am trying to map a stringList1 to another stringList2 and then trying to check the size of the string list after that.
Unfortunately when, there is only one value in the input stringList1, then the mapped stringList2 is also converting to a string
Hence when i check the size of this stringList2 or invoke Makestrings service it is throwing the error as below
=============================================
class java.lang.String cannot be cast to class [Ljava.lang.String; (java.lang.String and [Ljava.lang.String; are in module java.base of loader âbootstrapâ)
java.lang.ClassCastException
java.lang.ClassCastException: class java.lang.String cannot be cast to class [Ljava.lang.String; (java.lang.String and [Ljava.lang.String; are in module java.base of loader âbootstrapâ)
at pub.list.appendToStringList(list.java:471)
at jdk.internal.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:404)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:759)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:53)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:339)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:33)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:629)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:434)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:392)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:260)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:231)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:263)
at com.wm.lang.flow.FlowMapInvoke.invokeService(FlowMapInvoke.java:189)
at com.wm.lang.flow.FlowMap.invoke(FlowMap.java:301)
at com.wm.lang.flow.FlowMap.invoke(FlowMap.java:166)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:662)
at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:576)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:464)
at wm.server.flowdebugger.singleStepMap(flowdebugger.java:1292)
at wm.server.flowdebugger.execute(flowdebugger.java:508)
at jdk.internal.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:414)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:759)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:53)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:339)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:33)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:629)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:434)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:392)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:260)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:203)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:391)
at com.wm.util.pool.PooledThread.run(PooledThread.java:127)
at java.base/java.lang.Thread.run(Thread.java:829)
But works fine when multiple strings in stringList1
can someone please help how i can make sure that the string list doesnt convert to string even when the input is a string