[jira] [Commented] (JENA-1591) DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a boolean/Object
[ https://issues.apache.org/jira/browse/JENA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16577344#comment-16577344 ] ASF GitHub Bot commented on JENA-1591: -- Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/461 > DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a > boolean/Object > --- > > Key: JENA-1591 > URL: https://issues.apache.org/jira/browse/JENA-1591 > Project: Apache Jena > Issue Type: Improvement >Affects Versions: Jena 3.8.0 >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: Jena 3.9.0 > > > TransactionCoordinator's finishActiveTransaction method calls the Set method: > activeTransactions.remove(transaction) ; > It stores the return value as `x`, and then checks if x == null. As Set > returns a boolean, it won't ever be true. > Submitting a pull request where we actually use the boolean value. > Another simple issue, but that I could not come up with a simple unit test, > sorry. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1591) DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a boolean/Object
[ https://issues.apache.org/jira/browse/JENA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16577343#comment-16577343 ] ASF subversion and git services commented on JENA-1591: --- Commit 85a5a3b4e97174e255624eed441e824d87c8304c in jena's branch refs/heads/master from [~brunodepau...@yahoo.com.br] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=85a5a3b ] Merge branch 'JENA-1591' > DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a > boolean/Object > --- > > Key: JENA-1591 > URL: https://issues.apache.org/jira/browse/JENA-1591 > Project: Apache Jena > Issue Type: Improvement >Affects Versions: Jena 3.8.0 >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: Jena 3.9.0 > > > TransactionCoordinator's finishActiveTransaction method calls the Set method: > activeTransactions.remove(transaction) ; > It stores the return value as `x`, and then checks if x == null. As Set > returns a boolean, it won't ever be true. > Submitting a pull request where we actually use the boolean value. > Another simple issue, but that I could not come up with a simple unit test, > sorry. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1591) DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a boolean/Object
[ https://issues.apache.org/jira/browse/JENA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16577342#comment-16577342 ] ASF subversion and git services commented on JENA-1591: --- Commit c29aefa8d0a8fbf7cda1c8c973a779b9cfb30445 in jena's branch refs/heads/master from [~brunodepau...@yahoo.com.br] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=c29aefa ] JENA-1591: use boolean value in if expression > DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a > boolean/Object > --- > > Key: JENA-1591 > URL: https://issues.apache.org/jira/browse/JENA-1591 > Project: Apache Jena > Issue Type: Improvement >Affects Versions: Jena 3.8.0 >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: Jena 3.9.0 > > > TransactionCoordinator's finishActiveTransaction method calls the Set method: > activeTransactions.remove(transaction) ; > It stores the return value as `x`, and then checks if x == null. As Set > returns a boolean, it won't ever be true. > Submitting a pull request where we actually use the boolean value. > Another simple issue, but that I could not come up with a simple unit test, > sorry. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1591) DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a boolean/Object
[ https://issues.apache.org/jira/browse/JENA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16577341#comment-16577341 ] ASF GitHub Bot commented on JENA-1591: -- Github user kinow commented on the issue: https://github.com/apache/jena/pull/461 Rebased and amended to use my apache e-mail in the commits. Merging. Thanks!!! > DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a > boolean/Object > --- > > Key: JENA-1591 > URL: https://issues.apache.org/jira/browse/JENA-1591 > Project: Apache Jena > Issue Type: Improvement >Affects Versions: Jena 3.8.0 >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: Jena 3.9.0 > > > TransactionCoordinator's finishActiveTransaction method calls the Set method: > activeTransactions.remove(transaction) ; > It stores the return value as `x`, and then checks if x == null. As Set > returns a boolean, it won't ever be true. > Submitting a pull request where we actually use the boolean value. > Another simple issue, but that I could not come up with a simple unit test, > sorry. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (JENA-1591) DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a boolean/Object
[ https://issues.apache.org/jira/browse/JENA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16577176#comment-16577176 ] ASF GitHub Bot commented on JENA-1591: -- GitHub user kinow opened a pull request: https://github.com/apache/jena/pull/461 JENA-1591: use boolean value in if expression Another one found in Eclipse while I was reading some other code for UUID's. The value returned from the `Set` object will be a `boolean`, so the `== null` won't ever eval to true. This pull request uses the expression `! x` as that's what I thought we actually wanted to test. But happy to update it if I made the wrong assumption. Could not find an easy way to generate a unit test, but if there's some simple approach, please let me know and I will update the pull request. Thanks Bruno You can merge this pull request into a Git repository by running: $ git pull https://github.com/kinow/jena JENA-1591 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jena/pull/461.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #461 commit 76a02057a4f6e43bb1e237bf4caca17c9b395435 Author: Bruno P. Kinoshita Date: 2018-08-11T12:59:46Z JENA-1591: use boolean value in if expression > DBOE TransactionCoordinator#finishActiveTransaction has an invalid if with a > boolean/Object > --- > > Key: JENA-1591 > URL: https://issues.apache.org/jira/browse/JENA-1591 > Project: Apache Jena > Issue Type: Improvement >Affects Versions: Jena 3.8.0 >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: Jena 3.9.0 > > > TransactionCoordinator's finishActiveTransaction method calls the Set method: > activeTransactions.remove(transaction) ; > It stores the return value as `x`, and then checks if x == null. As Set > returns a boolean, it won't ever be true. > Submitting a pull request where we actually use the boolean value. > Another simple issue, but that I could not come up with a simple unit test, > sorry. -- This message was sent by Atlassian JIRA (v7.6.3#76005)