feat(storage): add the spring-services-storage module - #46
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step only: get the
ObjectStorecode 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 thedocs/TODO.mdentry this PR adds for what stays open.What moved
The
storage/folder in the repo root, unchanged in substance:ObjectStore,StoredObject,ObjectStoreException,ObjectNotFoundExceptions3/S3ObjectStore,s3/S3Configfile/FileObjectStorememory/InMemoryObjectStorePackage renamed
com.openelements.api.storage→com.openelements.spring.base.services.storage, matching the reactor's layout.Wiring
spring-services-storage, registered in the reactor, inspring-services-alland in the BOM.software.amazon.awssdk:s3pinned via a newawssdk.versionproperty in the root POM, next to the other third-party versionsjava-parentdoes not manage.package-info.javaadded formemory/, 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:
-Dmaven.javadoc.failOnWarnings=true, and the moved sources had missing comments on constructors, public fields and two methods. All filled in.@Nullableannotations.ObjectStoreException'scauseis passednullbyInMemoryObjectStore, andcontentOfreturnsnullfor an absent key — both forbidden by the packages' own@NullMarkedcontract 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.🤖 Generated with Claude Code