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

Generated set properties share the same instance #5

Open
jeroenvs opened this issue Jun 14, 2022 · 0 comments
Open

Generated set properties share the same instance #5

jeroenvs opened this issue Jun 14, 2022 · 0 comments

Comments

@jeroenvs
Copy link
Member

Using the BeanBuilder.fill() method causes set and other collection based properties to reuse the same mutable collection instance. When the collection is decorated it will cause followup tests to fail.

Please use the immutable collections as default:

        registerValue(List.class, List::of);
        registerValue(Set.class, Set::of);
        registerValue(Collection.class, List::of);
        registerValue(Map.class, Map.of);
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

No branches or pull requests

1 participant