[
https://issues.apache.org/jira/browse/FINERACT-827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17013783#comment-17013783
]
Michael Vorburger commented on FINERACT-827:
--------------------------------------------
{quote}equals() / hashCode() was implemented using Commons Lang EqualsBuilder
and HashCodeBuilder (instead of Objects.hash() and Objects.equals(), which
should not matter...){quote}
I've implementing it using {{Objects.hash()}} and {{Objects.equals}} instead of
Commons Lang EqualsBuilder and HashCodeBuilder, and even that, obviously,
causes the same problem.
{quote}not using getId() for @ManyToOne fields ShareAccount and Charge{quote}
I've also implementing it using {{getId()}} for the two {{@ManyToOne}} fields
{{shareAccount}} and {{charge}}, including handling the possibility that those
fields can be {{null}}, see
https://github.com/apache/fineract/compare/develop...vorburger:spotbugs-FINERACT-827_ShareAccountCharge?w=1.
The ShareAccountIntegrationTests is still failing, as above. I guess this means
that we have a real (bad) bug here, and that the calculation which the test
attempts to verify was actually always incorrect - should that be 2.0 instead
of 0.0 ?
What's super confusing is that if even if I change the test, it still fails,
but "the other way around" ... or are the tests that unreliable? Do we need to
drop the DB every time we re-run an IT like this individually?
> ShareAccountCharge is missing hashCode() & equals() but adding it fails
> ShareAccountIntegrationTests
> ----------------------------------------------------------------------------------------------------
>
> Key: FINERACT-827
> URL: https://issues.apache.org/jira/browse/FINERACT-827
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Michael Vorburger
> Priority: Blocker
>
> During work in FINERACT-702 (specifically during
> [pull/684|https://github.com/apache/fineract/pull/684]), we've stumbled upon
> {{ShareAccountCharge}} missing required {{hashCode()}} & {{equals()}}
> methods, but found that adding them fails the
> {{ShareAccountIntegrationTests}}.
> This is likely an indication of a major bug worth further investigating.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)