Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBTM-3562 Child class fields should not shadow parent class fields #1932

Merged
merged 1 commit into from Dec 15, 2021

Conversation

boris-unckel
Copy link
Contributor

@boris-unckel boris-unckel commented Dec 2, 2021

Fixes https://issues.redhat.com/browse/JBTM-3562

Removes fields from child classes, where parent class provides the field.

CORE !TOMCAT !AS_TESTS !RTS !JACOCO !XTS QA_JTA !QA_JTS_JACORB !QA_JTS_JDKORB !QA_JTS_OPENJDKORB !PERF !LRA NO_WIN !DB_TESTS !mysql !db2 !postgres !oracle

@jbosstm-bot
Copy link

⚠️ narayana CI not started.

Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT

1 similar comment
@jbosstm-bot
Copy link

⚠️ narayana CI not started.

Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT

@boris-unckel
Copy link
Contributor Author

boris-unckel commented Dec 2, 2021

@jmfinelli @mmusgrov Could you check and start the CI, please? Do the chosen runs cover enough?

@jmfinelli
Copy link
Contributor

@boris-unckel I would select only CORE to test this modification.

The list of profile that I would run is:
CORE !TOMCAT !AS_TESTS !RTS !JACOCO !XTS !QA_JTA !QA_JTS_JACORB !QA_JTS_JDKORB !QA_JTS_OPENJDKORB !PERF !LRA NO_WIN !DB_TESTS !mysql !db2 !postgres !oracle

Note: BTW, !NO_WIN means that the test profile WIN will be run (double negation).

@boris-unckel
Copy link
Contributor Author

@jmfinelli Thanks, I have updated the comment above.

@mmusgrov
Copy link
Contributor

mmusgrov commented Dec 2, 2021

Thanks @boris-unckel
We are on a day of learning tomorrow so one of us will review your PR later.
We did notice that there are missing tests though. Will you add some for DisposeRecord (I don't think we have any so that would be a real bonus), then we can run them with and without your change.

@boris-unckel
Copy link
Contributor Author

@@ -1387,7 +1387,7 @@ synchronized final void destroyed ()

protected Hashtable modifyingActions = null;
protected Hashtable usingActions = null;
protected final Uid objectUid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final cannot be removed. In fact, objectUid should never be changed once created.

@@ -267,8 +267,6 @@ public DisposeRecord ()
typeName = null;
targetParticipantStore = null;
}

private Uid objectUid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a consequence of my previous comment (and for design reasons), this cannot be modified. For clarity sake, DisposeRecord.objectUid could be renamed to something that will not trigger warnings in code analysis tools...but:

  • The new name should reflect the reasons why this variable was declared here (and those reasons can be found in the original design of Arjuna)
  • I am not sure that other contributors/maintainers would agree with me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine renaming it. Something like "originalInstanceID" as the DisposeRecord is created to potentially manage the state of other StateManager objects, like TXOJ, in the event of crash recovery.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmfinelli @nmcl Thanks for your feedback. I'm going to prepare a update for PR with renaming.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @boris-unckel for updating your PR

Fixes https://issues.redhat.com/browse/JBTM-3562

Removes fields from child classes, where parent class provides the field.
Rename fields where child field is correct.
@jbosstm-bot
Copy link

⚠️ narayana CI not started.

Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT

1 similar comment
@jbosstm-bot
Copy link

⚠️ narayana CI not started.

Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT

@jmfinelli
Copy link
Contributor

TESTIT

@jbosstm-bot
Copy link

@jbosstm-bot
Copy link

@jbosstm-bot
Copy link

@jbosstm-bot
Copy link

@jbosstm-bot
Copy link

@jbosstm-bot
Copy link

Copy link
Contributor

@mmusgrov mmusgrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, thanks @boris-unckel

@mmusgrov mmusgrov merged commit 0fb6c3a into jbosstm:master Dec 15, 2021
@mmusgrov
Copy link
Contributor

@boris-unckel I am not able to assign you the jira, will see if you are able to self assign it.

@boris-unckel
Copy link
Contributor Author

@mmusgrov Thanks for merging. I don't have the necessary rights granted in general. This problem is a general one for RedHats Jira. I don't mind if you take it yourself or keep it empty (both happened in different projects).

@boris-unckel boris-unckel deleted the JBTM-3562_remove_shadow branch December 15, 2021 15:27
@mmusgrov
Copy link
Contributor

mmusgrov commented Dec 15, 2021 via email

@boris-unckel
Copy link
Contributor Author

With a workaround: In the past a WFLY Jira had a button "Start progress" (or similar). This workflow included a assign. But direct assigning by maintainers did not work, too.

@mmusgrov
Copy link
Contributor

mmusgrov commented Dec 16, 2021 via email

@boris-unckel
Copy link
Contributor Author

@mmusgrov I have tried. But (for me?) there is only a "Log work" button, not "Start Progress". Please check this screenshot: https://ibb.co/fQ2Vxs9

@boris-unckel
Copy link
Contributor Author

Now it's getting really strange: The field Assignee shows "Unassigned". But filtering all issues with "Assigned to me" leads me to this one.

@mmusgrov
Copy link
Contributor

@boris-unckel yes I have raised the issue elsewhere and will provide an update when it is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants