Skip to content

feat(storage): add the spring-services-storage module - #46

Merged
herbie-bot merged 1 commit into
mainfrom
feat/storage-module
Sep 25, 2026
Merged

herbie-bot merged 1 commit into
mainfrom
feat/storage-module

Conversation

@herbie-bot

Copy link
Copy Markdown
Collaborator

First step only: get the ObjectStore code out of the application it lived in and into the reactor as a module that builds. Nothing about its Spring-facing design is decided here — see the docs/TODO.md entry this PR adds for what stays open.

What moved

The storage/ folder in the repo root, unchanged in substance:

ObjectStore, StoredObject, ObjectStoreException, ObjectNotFoundException the API
s3/S3ObjectStore, s3/S3Config AWS SDK v2 implementation, multipart streaming
file/FileObjectStore local directory, scratch-then-move writes, traversal-guarded keys
memory/InMemoryObjectStore fake for tests

Package renamed com.openelements.api.storage → com.openelements.spring.base.services.storage, matching the reactor's layout.

Wiring

  • New module spring-services-storage, registered in the reactor, in spring-services-all and in the BOM.
  • software.amazon.awssdk:s3 pinned via a new awssdk.version property in the root POM, next to the other third-party versions java-parent does not manage.
  • A package-info.java added for memory/, which had none — without it that package alone was not @NullMarked.

Two small code changes

The move surfaced two things that could not stay as they were:

  • 17 Javadoc warnings. CI builds with -Dmaven.javadoc.failOnWarnings=true, and the moved sources had missing comments on constructors, public fields and two methods. All filled in.
  • Two @Nullable annotations. ObjectStoreException's cause is passed null by InMemoryObjectStore, and contentOf returns null for an absent key — both forbidden by the packages' own @NullMarked contract until annotated.

Verification

  • ./mvnw -Pfull-build clean verify -Dmaven.javadoc.failOnWarnings=true — green across all twelve modules, all tests, including the aggregate test that now boots with the storage module on the classpath.
  • The new PomChecker guard passes on the new POM.

🤖 Generated with Claude Code

Moves the ObjectStore API and its three implementations — S3, file system
and in-memory — into a new reactor module, so the code that so far lived
inside one application becomes part of the library.

This is the first step and deliberately only that: the sources are in,
the reactor builds them, and nothing about their Spring-facing design has
been decided yet. What that leaves open is recorded in docs/TODO.md.

- Package renamed from com.openelements.api.storage to the reactor's
  com.openelements.spring.base.services.storage.
- Module wired into the reactor, spring-services-all and the BOM.
- software.amazon.awssdk:s3 added, version pinned in the root POM next to
  the other third-party versions java-parent does not manage.
- Javadoc completed on every public member: CI builds with
  -Dmaven.javadoc.failOnWarnings=true, and the moved sources carried 17
  missing-comment warnings.
- ObjectStoreException's cause and InMemoryObjectStore.contentOf's return
  marked @nullable — both are null in practice, which the packages'
  @NullMarked contract otherwise forbids.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@herbie-bot
herbie-bot merged commit 37e4e42 into main Sep 25, 2026
1 check passed
@herbie-bot
herbie-bot deleted the feat/storage-module branch September 25, 2026 06:51
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.

2 participants