Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

Inconsistent use of (Truncated)MiniCartBeanFactory #681

@selo-ecube

Description

@selo-ecube
  • MiniCartControllerComponent uses CartInSession to find an existing Cart and MyCartBeanFactory to create an empty Cart if no Cart exists for the session, yet.
  • CartInSession uses TruncatedMiniCartBeanFactory to create a truncated MiniCartBean when serializing a Cart into the session cookie.
  • The use of MiniCartBeanFactory to create an empty Cart and a TruncatedMiniCartBeanFactory to serialize a non-empty Cart confused me when I was looking for the cause of a bug and makes it harder to introduce a subtype of MiniCartBean. Using TruncatedMiniCartBeanFactory / CartInSession.createMiniCart(...) would require additional null checks in TruncatedMiniCartBeanFactory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions