
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Talend ESB 7.1.1 : Important bug, test returns false instead of true
Hi guys,
Following a previous topic I've made here (https://community.talend.com/t5/Design-and-Development/Conditional-component-simple-if-true-commit-e...), I've decided to open a new one specially dedicated to this bug I've just isolated a bit more now.
I encountered this bug two times in two days that's why I would like it to be identified or maybe patched if this is really a talend issue.
I simplified my flow like this now :
That flow has only one goal : count the number of rows returned by a join between two tables (located in two different db's)
Then the result is compared to an other value which should be provided by a parent job (using context value). In this exemple, I've only ran the child job so I defined the value right inside the context like this :
Below, I printed both values and then compared them.
Finally, here is the result i get after running my job :
Good luck & Have fun
Guillaume.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it is not a Talend Bug, but Java feature
https://stackoverflow.com/questions/1514910/how-to-properly-compare-two-integers-in-java

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it is not a Talend Bug, but Java feature
https://stackoverflow.com/questions/1514910/how-to-properly-compare-two-integers-in-java

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vapukov,
Friends of mine told me last week that it was due to bad use of java, as you did.
But what makes them think this way ? I simply show them the issue upside down.
I was doing this comparison (with == instead of equals method) inside two different components : a tMap and this tJavaRow.
As it was working great inside the tMap I have postulated that this behaviour was right.
Then, I discovered it was not working inside the tJavaRow and I thought the issue was there, that's why I created this topic.
Fact is I only show you (and friends of mine) the content of the tJavaRow without even talking about my tMap. This way you all found the solution which is really great, thanks again
BUT, now I discovered that the tMap I thought was working well ... is actually not ... (see screenshots below)
As you can see, here I'm using == to compare two integers greater than 127 ...
If I follow your instructions and how Java should work in this particular case, the result must be false... But it returns me true...
And because of that, I thought this tJavaRow was not working well ...
So it seems there is an issue though with Talend in this case, no ?
Guillaume

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if You check schema you will see for INteger type - Int/Integer, it means type could be any of 2
but Int does not equal Integer
equal - more safe and predicted
