Skip to content

Conversation

@ansoncfit
Copy link
Member

Fixes #751

@trevorgerhardt
Copy link
Member

Changes look good to me. Do we know why those tests are failing? Once we address those I will approve.

trevorgerhardt
trevorgerhardt previously approved these changes May 24, 2025
Copy link
Member

@abyrd abyrd left a comment

Choose a reason for hiding this comment

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

After discussing with Anson I made some changes. The reason the network was changing after deserialization was that some of its fields were not being initialized. This is because the default (no-arg) constructor no longer existed so the deserialization was using a special non-constructor approach to instantiate the object, which leaves those fields null instead of evaluating their initialization expressions. The underlying reason is a Java quirk: default no-arg constructors exist automatically until you add some other constructor with arguments, then the default one is no longer created automatically.

@abyrd abyrd merged commit 4bd0f6e into dev May 29, 2025
3 checks passed
@abyrd abyrd deleted the config-save-shapes branch May 29, 2025 11:31
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.

Saving shape information in network.dat (r5r)

4 participants