[resolved] If statement in tJavaRow

One Star

[resolved] If statement in tJavaRow

I have put a tJavarow component in my job to process some context data relating to a file being passed along the job.
the tJavaRow contains the following code -:
----------------------------------------------------------------------------------------------------------------------
context.EDB_Data = "-";
System.out.println(context.EDB_Mask);
System.out.println(context.EDB_PDF_SIZE);
if (context.EDB_Mask == "R900S") {
System.out.println(context.EDB_Mask);
if (context.EDB_PDF_SIZE > 5000)
System.out.println("Contents");
else
System.out.println("NO Contents");
}
-------------------------------------------------------------------------------------------------------------------------
the output was as follows -:
R900S
28575
R0111
3361
R0110
13552
R0120
13070
I was was expecting after 28575 the following
R900S to be printed again as it matched the IF statement
Contents to be printed as the context size variable is greater than 5000
This has not worked and I need some Java help in getting the code correct
It should be noted that I need a total of 9 tests for the MASK in context , I should be able to clone a working solution as long as each main if is self contained.

Accepted Solutions
One Star

Re: [resolved] If statement in tJavaRow

I fixed it
if (context.EDB_Mask == "R900S") .................. should be
if (context.EDB_Mask.equals("R900S"))

All Replies
One Star

Re: [resolved] If statement in tJavaRow

I fixed it
if (context.EDB_Mask == "R900S") .................. should be
if (context.EDB_Mask.equals("R900S"))