
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Java null pointer exception
In my excel file there are 10 records in the last record there are null values and the expressions are like this
StringHandling.FTRIM(row1.Terms_Code_2)+StringHandling.STR(' ',5)
TalendDate.getLastDayOfMonth(row1.AS_OF_DATE )
If there is null it should proceed
How can I do exception handling for this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you take an example to explain what are your expected output?
Regards
Shong

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may try to do the follow
row1.AS_OF_DATE == null ? null : StringHandling.FTRIM(row1.Terms_Code_2)+StringHandling.STR(' ',5)
TalendDate.getLastDayOfMonth(row1.AS_OF_DATE )
What it means is if row1.AS_OF_DATE is null then set it as null else return the expressions that you need.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which filed may contains null value? row1.Terms_Code_2 or row1.AS_OF_DATE?
Hi both are different columns
My requirement is if row1.Terms_Code_2 has some value put it or put null same for row1.AS_OF_DATE
My input is excel file
I know there is something called Relational Null but it is not working can you help me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your writing please check this
Hi both are different columns
My requirement is if row1.Terms_Code_2 has some value put it or put null same for row1.AS_OF_DATE
My input is excel file
I know there is something called Relational Null but it is not working can you help me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are saying both columns may contain null
Maybe you can handle them separately?
row1.AS_OF_DATE == null ? null : row1.AS_OF_DATE
row1.Terms_Code_2 == null ? null : row1.Terms_Code_2
Can you give an example to explain the scenario clearer? What are you trying to achieve here?
