Changelog¶
2.1.0¶
Breaking changes
-
All listings are immediate by default.
Stream<T>,List<T>,Set<T>,Collection<T>, andT[]methods now return only immediate children (one level) regardless of element type. Previously, plainT(notS3.DirorS3.File) silently used a recursive flat listing. -
@Walkreplaced by@Recursive. The@Walkannotation and itsmaxDepth/minDepthattributes have been removed. Use@Recursiveto opt into recursive listing. There is no depth control; for depth-limited traversal, useS3File.walk()directly.
New features
- Input validation on single-arg methods.
@Prefix,@Suffix,@Match, and@Filterannotations on the return type or method now validate the input name when calling single-arg proxy methods likeUserFile user(String name). AnIllegalArgumentExceptionis thrown if the name doesn't pass. This catches invalid keys at the call site rather than silently creating a proxy for a non-matching key.
Migration
| Before (2.0.x) | After (2.1.0) |
|---|---|
@Walk Stream<S3File> all() |
@Recursive Stream<S3File> all() |
@Walk Stream<S3.Dir> dirs() |
@Recursive Stream<S3.Dir> dirs() |
@Walk(maxDepth=1) Stream<X> items() |
Stream<X> items() (immediate is now the default) |
@Walk(minDepth=n, maxDepth=n) Stream<X> exact() |
Remove — use S3File.walk() manually |
Stream<T> items() (plain T, was recursive) |
Add @Recursive to preserve old behavior, or leave as-is for immediate |
2.0¶
Breaking changes
-
Upgraded to AWS SDK v2. The library now uses the AWS SDK v2 (
S3AsyncClient) exclusively. The v1S3Clientdependency has been removed. -
S3.of()removed. Uses3Bucket.as(MyInterface.class)ands3File.as(MyInterface.class)instead. -
S3.get()renamed toS3.file(). All call sites referencingS3.get()must be updated.
New features
-
S3.DirandS3.Fileparent interfaces. Typed proxies can now useS3.DirandS3.Fileas return types to distinguish directories from files in listings.Stream<S3.Dir>returns only directories;Stream<S3.File>returns only files. -
@Prefixsupport in@Walkand list operations. The@Prefixannotation now works with@Walkand standard list methods, allowing prefix-scoped recursive and flat listings. -
@Delimiterworks with@Walk. The@Delimiterannotation can now be combined with@Walkfor more precise listing control. -
@Filteron interfaces. The@Filterannotation can now be placed on the interface type itself, applying the filter to all listing methods in that interface. -
@Suffixand@Matchannotations. New annotations for filtering S3 listings by suffix or regex pattern. Both support anexcludeflag and are repeatable. -
@Matchand@Suffixexcludeflag. Both annotations acceptexclude = trueto invert the match, filtering out entries that match rather than keeping them. -
Expanded
upload()methods. Additional overloads for uploading content fromString,byte[],File,Path, andInputStream. -
ObjectMetadataimprovements. AddedObjectMetadata.from(File)andObjectMetadata.from(Path)for automatic content-type detection, plus a builder API. -
Fluent
put()methods onS3Bucket. New convenience methods for writing content directly to a bucket path. -
Default methods on
S3.File. Typed proxy interfaces extendingS3.Filenow inherit default method implementations for common operations. -
jaws-s3-testmodule. New test module withMockS3for local S3 simulation andS3Assertsfor fluent JUnit 5 assertions on bucket contents. -
Annotations migrated into JAWS.
@Name,@Parent,@Walk, and other annotations previously in external libraries are now part of the JAWS project directly.