You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/09/26 11:14:15 UTC
[PR] Add Path variants of the File-based API [maven-indexer]
slachiewicz opened a new pull request, #802:
URL: https://github.com/apache/maven-indexer/pull/802
Adds `java.nio.file.Path` equivalents next to the `File`-based API and deprecates the `File` methods they replace:
- `Indexer`: `createIndexingContext`, `createMergedIndexingContext` and `identify` taking `Path` (default methods).
- `IndexingContext`: `getRepositoryPath()`, `getIndexDirectoryPath()` (default methods).
- `ArtifactContext`: `getPomPath()`, `getArtifactPath()`, `getMetadataPath()`.
- `IndexPackingRequest(IndexingContext, IndexReader, Path)` and `getTargetPath()`.
- `IndexUpdateRequest`: `get/setIndexTempPath`, `get/setLocalIndexCachePath`.
- `DefaultIndexUpdater.FileFetcher(Path)`.
Nothing is removed or changes signature, so existing callers and implementations keep compiling; they see deprecation warnings. Interfaces that users implement (`ResourceFetcher`, `Locator`, `ArtifactContextProducer`) are unchanged. Setters and getters with a `Path` counterpart get distinct names where an overload would make a `null` argument ambiguous. `@since 7.2.0` assumes the next release is a minor.
The second commit moves our own code and tests to the new methods, except where code receives an `IndexingContext` from a caller: a proxy (as `indexer-cli` builds for unpacking) or a Mockito mock of the interface does not run default methods, so those sites keep calling the `File` methods.
Removing the `File` methods belongs to the next major, with #479.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add Path variants of the File-based API [maven-indexer]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz merged PR #802:
URL: https://github.com/apache/maven-indexer/pull/802
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org