<?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 Re: tMap strange null pointer error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353506#M119677</link>
    <description>&lt;P&gt;Thank for answer&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 08:18:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-06-12T08:18:36Z</dc:date>
    <item>
      <title>tMap strange null pointer error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353503#M119674</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;just maybe somebody meets with similar case:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Source structure:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-06-06 at 12.10.47 AM.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5SR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129463iBA64E7FB34FB8247/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5SR.png" alt="0683p000009M5SR.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Next tMap code, works as expected:&lt;/P&gt; 
&lt;PRE&gt;row1.event.equals("TEXT")?
null
:row1.validAfter==null?
null
:Long.valueOf(TalendDate.formatDate("yyyyMMddHH",row1.validAfter) ) &lt;/PRE&gt; 
&lt;P&gt;but similar extended construction:&lt;/P&gt; 
&lt;PRE&gt;row1.event.equals("TEXT")?
null
:row1.isPermanent==1L?
-1L
:row1.validUntil==null?
null
:Long.valueOf(TalendDate.formatDate("yyyyMMddHH",row1.validUntil) ) &lt;/PRE&gt; 
&lt;P&gt;not!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;each part of wrong code work fine, and current solution -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;replaced by SQL CASE at source for validUntil:&lt;/P&gt; 
&lt;PRE&gt;row1.event.equals("TEXT")?
null&lt;/PRE&gt; 
&lt;P&gt;tMap&amp;nbsp;for&amp;nbsp;out.validUntil_Long&lt;/P&gt; 
&lt;PRE&gt;row1.validUntil==null?
null
:Long.valueOf(TalendDate.formatDate("yyyyMMddHH",row1.validUntil) ) &lt;/PRE&gt; 
&lt;P&gt;tjavaRow&lt;/P&gt; 
&lt;PRE&gt;if (row1.isPermanent==1L) {
out.validUntil_Long = -1L;
}&lt;/PRE&gt; 
&lt;P&gt;3 step work as expected, but all together - not&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Java 8, Windows&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;solutions it work well, just interesting - why? is it an error in the my&amp;nbsp;IF code, error in talend or java&amp;nbsp;version specific issue?&lt;BR /&gt;&lt;BR /&gt;regards, Vlad&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:48:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353503#M119674</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-06-05T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: tMap strange null pointer error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353504#M119675</link>
      <description>&lt;P&gt;I can't see anything immediately obvious I'm afraid. The only thing that looks like it might lead to a null pointer exception is the row1.event.equals("TEXT") code. However, your working solution has this as well.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 17:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353504#M119675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-05T17:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: tMap strange null pointer error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353505#M119676</link>
      <description>&lt;P&gt;I will test it later, what source of error - mix of types or construction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have multi conditions constructions for string only and all work as expected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at the same time I have working constriction like:&lt;/P&gt;&lt;PRE&gt;condition?
(condition? (condition? true : false) : false)
:(condition? true : (condition? true : false))&lt;/PRE&gt;&lt;P&gt;and it works with different types&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so need to find a time and simulate test cases&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the answer&amp;nbsp;Richard!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 10:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353505#M119676</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-06-10T10:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: tMap strange null pointer error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353506#M119677</link>
      <description>&lt;P&gt;Thank for answer&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 08:18:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-strange-null-pointer-error/m-p/2353506#M119677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-12T08:18:36Z</dc:date>
    </item>
  </channel>
</rss>

