Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
temp_nva_out_tmp.isOK = !Relational.ISNULL(IN.isOK) ? 1 : temp_nva_in.isOK;
// # Output table : 'temp_nva_out'
temp_nva_out_tmp.uid = in.uid;
temp_nva_out_tmp.isOK = !Relational.ISNULL(in.isOK) ? 1 : temp_nva_in.isOK;
temp_nva_out = temp_nva_out_tmp;
if(input_row.isOk==null)
output_row.isOk = 0;
temp_nva_out_tmp.isOK = !Relational.ISNULL(in.isOK) ? new Integer( 1 ) : temp_nva_in.isOK;
temp_nva_out_tmp.isOK = !Relational.ISNULL(in.isOK) ? 1 : temp_nva_in.isOK;
Initial stage of talend every one face a Null pointer exception , for TALEND TECH SUPPORT JION https://t.me/talendtechsupport
Hi, it's due to ternary autoboxing, in the first one it reads the left part as an Integer (it's a wrapper Object wich accept null value) so it will convert temp_nva_in.isOK to Integer
in the second one you set 1 on the left it will read it as an int and convert it as an int(doesn't support null values it's a primitive type) so it throw null pointer exception if temp_nva_in.isOK is null.
you could also write :
temp_nva_out_tmp.isOK = in.isOK != null? new Integer( 1 ) : temp_nva_in.isOK;
Send me Love and Kudos