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

Fix: Regressions caused by cleaning up BreakCycle & PopulateRanks #246

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

ptziegler
Copy link
Contributor

The for-each loop inside the BreakCycle method used to iterate over all graph nodes. This was wrongfully changed to a local variable which is initialized as an empty list.

The for-each loop inside PopulateRanks iterates over all graph nodes and calls VirtualNodeCreation internally. The constructor of this class, however, may add nodes to the graph, leading to a
ConcurrentModifcationException. To avoid this problem, we iterate of a local copy of the graph nodes instead.

Amends 31a7012

@ptziegler ptziegler linked an issue Aug 18, 2023 that may be closed by this pull request
@ptziegler
Copy link
Contributor Author

@azoitl

I just went over the changes from #234 again and in the future, those should really be separated into separate pull requests, simply because of how distracting some of the changes are...
At first glance there were:

  • Excessive whitespace changes
  • Override annotations and static modifiers being added
  • Parenthesis being added
  • Changes from Node.getNode() to Node.get()
  • The for-loop changes

If all of those were separated, I think it'd have been much easier to figure out what went wrong. Just some food for thought 😅

@github-actions
Copy link

github-actions bot commented Aug 18, 2023

Unit Test Results

    9 files      9 suites   17s ⏱️
309 tests 307 ✔️ 2 💤 0
927 runs  921 ✔️ 6 💤 0

Results for commit 4e05b79.

♻️ This comment has been updated with latest results.

The for-each loop inside the BreakCycle method used to iterate over all
graph nodes. This was wrongfully changed to a local variable which is
initialized as an empty list.

The for-each loop inside PopulateRanks iterates over all graph nodes and
calls VirtualNodeCreation internally. The constructor of this class,
however, may add nodes to the graph, leading to a
ConcurrentModifcationException. To avoid this problem, we iterate of a
local copy of the graph nodes instead.

Amends 31a7012
@azoitl
Copy link
Contributor

azoitl commented Aug 19, 2023

@azoitl

I just went over the changes from #234 again and in the future, those should really be separated into separate pull requests, simply because of how distracting some of the changes are... At first glance there were:

* Excessive whitespace changes

* Override annotations and static modifiers being added

* Parenthesis being added

* Changes from Node.getNode() to Node.get()

* The for-loop changes

If all of those were separated, I think it'd have been much easier to figure out what went wrong. Just some food for thought 😅

@ptziegler I think you are totally right. My naive attempt of thinking to clean-up files that are touched automatically does not seem to work. At least for the Override annotation I found a better solution: I used a project wide clean-up feature from Eclipse IDE: PR #241. But for others I'm not yet sure. Happy for any ideas.

@azoitl
Copy link
Contributor

azoitl commented Aug 19, 2023

@ptziegler thx for the fast reaction, the fix, and a test for it!

@azoitl azoitl merged commit 1c02ff4 into eclipse-gef:master Aug 19, 2023
4 checks passed
@azoitl azoitl added this to the 3.17.0 milestone Aug 19, 2023
@ptziegler ptziegler deleted the issue245 branch August 19, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible regression caused by [#155] Typed node list
2 participants