Hi all, I detected a bad behavior in 5.0 (maybe corrected with last version). -1 parent job (transmit whole context enabled) --context.strVar1 = "toto" --context.strVar2 not set -1 child job Default value context.strVar1 : null (type String) Default value context.strVar2 : null (type String) I transmit values through the child job context.
In child job : tJava : System.out.println("strVar1 ="+context.strVar1); System.out.println("strVar2 ="+context.strVar2); Result : strVar1 =toto strVar2 =null ====>NOT CORRECT it must be : strVar2 = null value is recognized as a String !
The "null"-Problem is caused by the Studio because it fills new String typed context variables with the String value "null". Go to the Context view and erase these nulls and that it. It is a bit annoying but not impossible. But I agree with you that should not happen!
This is how Java works. Try this..... String myNullVal = null; System.out.println("The result of concatenating a String with a NULL is...." + myNullVal); This is not a Talend issue, it is just the way Java works.