Skip to content

Simplify value classes, service and default tenant supplier - #80

Merged
derTobsch merged 1 commit into
mainfrom
simplify-value-classes
Nov 20, 2026
Merged

derTobsch merged 1 commit into
mainfrom
simplify-value-classes

Conversation

@derTobsch

Copy link
Copy Markdown
Contributor

Depends on #78, which it is based on: both change LaunchpadServiceImpl. Merge #78 first and delete its branch, so GitHub moves this PR onto main. Otherwise it is merged into the #78 branch, as happened with #74 and #75.

  • App, AppDto, AppName and Launchpad are records instead of classes with hand-written equals, hashCode and toString
  • Drop the LaunchpadService interface, which had a single implementation; LaunchpadServiceImpl is now LaunchpadService (tests renamed accordingly)
  • Drop a filter(Optional::isPresent) that flatMap(Optional::stream) already covers
  • Replace DefaultTenantSupplier with a lambda
  • LaunchpadDtoTest checks that templates can still read launchpad.apps[0].url etc. with property syntax (SpEL), now that AppDto is a record

Breaking for Java code that reads AppDto: the getters getUrl(), getName() and getIcon() become url(), name() and icon(). Templates using property syntax are not affected. App, AppName and Launchpad are not reachable from outside the package, since the service that returns them is package-private.

121 lines added, 299 removed.

@derTobsch
derTobsch force-pushed the simplify-value-classes branch from 95dd187 to 3c66164 Compare November 20, 2026 07:41
@derTobsch
derTobsch changed the base branch from anonymous-users-and-invalid-urls to main November 20, 2026 07:41
- App, AppDto, AppName and Launchpad are records instead of classes with
  hand-written equals, hashCode and toString
- Drop the LaunchpadService interface, it had a single implementation;
  LaunchpadServiceImpl is now LaunchpadService
- Drop a filter(Optional::isPresent) before flatMap(Optional::stream)
- Replace DefaultTenantSupplier with a lambda
@derTobsch
derTobsch force-pushed the simplify-value-classes branch from 3c66164 to 8fa3669 Compare November 20, 2026 07:42
@derTobsch
derTobsch merged commit 9da200d into main Nov 20, 2026
1 check passed
@derTobsch
derTobsch deleted the simplify-value-classes branch November 20, 2026 07:52
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.

1 participant