<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic nullPointer exception when using &amp;gt;= and not when using &amp;gt; in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/nullPointer-exception-when-using-gt-and-not-when-using-gt/m-p/2284805#M58427</link>
    <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I've been fighting this thing for a day and a half and have not been able to fix it, basically, I'm using a map as attached, where the lookup key is a concatenation of a string and part of an integer. However, even tho I check all values for null, if I check for a length of more than or equal to 2, i will get a nullpointerexception, this does not happen when I check for more than only, and the value is already checked and not null. Ive tried the following&lt;BR /&gt;&lt;BR /&gt;Key:&lt;/P&gt; 
&lt;PRE&gt;row4.Parent ==null?null:row4.Color_code==null?null:StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;=2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Key:&lt;/P&gt; 
&lt;PRE&gt;!Relational.ISNULL(row4.Parent)?!Relational.ISNULL(row4.Color_code)?StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;=2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1":"2":"3"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This will work just fine but obviously would skip an important part of my data:&lt;/P&gt; 
&lt;PRE&gt;row4.Parent ==null?null:row4.Color_code==null?null:StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;No dice, could anybody point me in the right direction?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Sun, 31 May 2020 16:16:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-31T16:16:50Z</dc:date>
    <item>
      <title>nullPointer exception when using &gt;= and not when using &gt;</title>
      <link>https://community.qlik.com/t5/Talend-Studio/nullPointer-exception-when-using-gt-and-not-when-using-gt/m-p/2284805#M58427</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I've been fighting this thing for a day and a half and have not been able to fix it, basically, I'm using a map as attached, where the lookup key is a concatenation of a string and part of an integer. However, even tho I check all values for null, if I check for a length of more than or equal to 2, i will get a nullpointerexception, this does not happen when I check for more than only, and the value is already checked and not null. Ive tried the following&lt;BR /&gt;&lt;BR /&gt;Key:&lt;/P&gt; 
&lt;PRE&gt;row4.Parent ==null?null:row4.Color_code==null?null:StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;=2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Key:&lt;/P&gt; 
&lt;PRE&gt;!Relational.ISNULL(row4.Parent)?!Relational.ISNULL(row4.Color_code)?StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;=2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1":"2":"3"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This will work just fine but obviously would skip an important part of my data:&lt;/P&gt; 
&lt;PRE&gt;row4.Parent ==null?null:row4.Color_code==null?null:StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;2?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1"&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;No dice, could anybody point me in the right direction?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 16:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/nullPointer-exception-when-using-gt-and-not-when-using-gt/m-p/2284805#M58427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-31T16:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: nullPointer exception when using &gt;= and not when using &gt;</title>
      <link>https://community.qlik.com/t5/Talend-Studio/nullPointer-exception-when-using-gt-and-not-when-using-gt/m-p/2284806#M58428</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQxzAAG"&gt;@3ezzet&lt;/A&gt;&amp;nbsp;, you will get null pointer exception when you are writing exception without handling nulls. try to use the below should not return null pointer exception. since you are taking&amp;nbsp;StringHandling.LEFT of 2 ,so you need to check length more than that value like&amp;nbsp; &amp;gt;2 or &amp;gt;=3 .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;for the below&lt;/P&gt; 
&lt;P&gt;row4.Parent ==null?null&lt;IMG id="smileysad" class="emoticon emoticon-smileysad" src="https://community.qlik.com/" alt="Smiley Sad" title="Smiley Sad" /&gt;row4.Color_code==null?null&lt;IMG id="smileysad" class="emoticon emoticon-smileysad" src="https://community.qlik.com/" alt="Smiley Sad" title="Smiley Sad" /&gt;StringHandling.LEN(String.valueOf(row4.Color_code))&amp;gt;=3?row4.Parent+StringHandling.LEFT(String.valueOf(row4.Color_code),2):"1"))&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 05:54:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/nullPointer-exception-when-using-gt-and-not-when-using-gt/m-p/2284806#M58428</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-06-01T05:54:08Z</dc:date>
    </item>
  </channel>
</rss>

