I have read and (believe I have) understood the posts made previously on this forum.
However as a Java novice I am having an issue
I create a MAP voucherDetails and pass it into a function where it is being populated (verified with trace). On return iy is empty. Why?
Map<String, Object> voucherDetails=new LinkedHashMap<>();
log.info("B4: "+voucherDetails.size());   // size is 0  
log.info("B4: "+voucherDetails.toString());     // {}
if (!ws.handleVoucherDetailsResponse(voucherDetails)){
    return false;
}
log.info("AF: "+voucherDetails.toString()); //{}
log.info("AF: "+voucherDetails.size());     // size is 0
public boolean handleVoucherDetailsResponse(Map<String, Object> voucher) throws IOException {
    log.enter("handleDetailsDetailsResponse");
    PCVMResponseType status=decodeResponse();
    switch (status) {       
    case DATA:
        voucher=decodeVoucherDetailsResponse(response);
        String accountno=(String)voucher.get("accountno");
        log.info("AA: "+accountno);
        String voucherno=(String)voucher.get("voucherno");
        log.info("VV: "+voucherno);         
        log.info("CC: "+voucher.size());
        log.info("IN: "+voucher.toString());            
        return true;
    default:
        return false;           
    }       
}
although voucher is being populated inside the function it is still empy on return. As if the Object is being passed not as a pointer to it.
What am I doing wrong and how do I do it correctly
TIA
Ephraim
 
     
    