<?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 [resolved] Convert a string to integer in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Convert-a-string-to-integer/m-p/2247506#M32672</link>
    <description>I want to &amp;nbsp;convert a string field to Integer variable:
&lt;BR /&gt;(Integer)globalMap.put("BillCount", Integer.parseInt(Trailer.TotalRecCount)))
&lt;BR /&gt;I got error:java.lang.NullPointerException:null.
&lt;BR /&gt;I am sure Trailer.TotalRecCount is a existing field in my tMap and is not an empty string. What is wrong in my code?
&lt;BR /&gt;Another similar conversion that convert a string to double variable is working good.
&lt;BR /&gt;((Double)globalMap.put("BillTotall", Double.parseDouble(Trailer.TotalAmount))). &amp;nbsp;&amp;nbsp;
&lt;BR /&gt;Please help.</description>
    <pubDate>Fri, 02 Jan 2015 15:18:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-02T15:18:18Z</dc:date>
    <item>
      <title>[resolved] Convert a string to integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Convert-a-string-to-integer/m-p/2247506#M32672</link>
      <description>I want to &amp;nbsp;convert a string field to Integer variable:
&lt;BR /&gt;(Integer)globalMap.put("BillCount", Integer.parseInt(Trailer.TotalRecCount)))
&lt;BR /&gt;I got error:java.lang.NullPointerException:null.
&lt;BR /&gt;I am sure Trailer.TotalRecCount is a existing field in my tMap and is not an empty string. What is wrong in my code?
&lt;BR /&gt;Another similar conversion that convert a string to double variable is working good.
&lt;BR /&gt;((Double)globalMap.put("BillTotall", Double.parseDouble(Trailer.TotalAmount))). &amp;nbsp;&amp;nbsp;
&lt;BR /&gt;Please help.</description>
      <pubDate>Fri, 02 Jan 2015 15:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Convert-a-string-to-integer/m-p/2247506#M32672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-02T15:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Convert a string to integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Convert-a-string-to-integer/m-p/2247507#M32673</link>
      <description>The put method only returns a value if there was a previous value in the map with the same key. If you add a complete new value to the globalMap the put method returns null.&lt;BR /&gt;You should simplify your code like this:&lt;BR /&gt;&lt;PRE&gt;globalMap.put("BillCount", Integer.parseInt(Trailer.TotalRecCount))&lt;/PRE&gt;</description>
      <pubDate>Sat, 03 Jan 2015 11:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Convert-a-string-to-integer/m-p/2247507#M32673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-03T11:48:08Z</dc:date>
    </item>
  </channel>
</rss>

