Copilot commented on code in PR #502:
URL:
https://github.com/apache/maven-build-cache-extension/pull/502#discussion_r3608842171
##########
src/test/java/org/apache/maven/buildcache/its/RemoteCacheDavTest.java:
##########
@@ -113,7 +113,7 @@ void cleanup() throws Exception {
}
public static Stream<Arguments> transports() {
- return Stream.of(Arguments.of("wagon"), Arguments.of("http"));
+ return Stream.of(Arguments.of("http"));
}
Review Comment:
`transports()` now only returns `"http"`, but the test body still contains
multiple `"wagon"` branches (URL prefixing, system properties, and priority
toggles). This leaves dead/unreachable code and makes the intent of the IT
harder to understand after dropping Wagon support. Consider de-parameterizing
the test (use a plain `@Test`) and removing the Wagon-specific
branches/properties entirely so the IT covers only the supported HTTP/WebDAV
path.
##########
pom.xml:
##########
@@ -302,8 +287,8 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.github.tomakehurst</groupId>
- <artifactId>wiremock-jre8</artifactId>
+ <groupId>org.wiremock</groupId>
+ <artifactId>wiremock</artifactId>
<version>${wiremockVersion}</version>
Review Comment:
The dependency has been switched from `wiremock-jre8` to
`org.wiremock:wiremock`, but the earlier dependencyManagement comment still
references `wiremock-jre8` pulling an older Jackson version. Please update that
comment to reflect the current WireMock artifact so future maintenance doesn’t
get confused.
##########
src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java:
##########
@@ -154,9 +153,6 @@ public Optional<byte[]> getResourceContent(String url) {
GetTask task = new GetTask(new URI(url));
transporter.get(task);
return Optional.of(task.getDataBytes());
- } catch (ResourceDoesNotExistException e) {
- logNotFound(fullUrl, e);
- return Optional.empty();
} catch (Exception e) {
// this can be wagon used so the exception may be different
// we want wagon users not flooded with logs when not found
Review Comment:
These comments still refer to Wagon usage/users, but Wagon support and the
Wagon-specific exception handling have been removed. Updating the comments to
describe the current behavior (treat HTTP 404 as a cache miss to avoid noisy
logging) will keep the code self-explanatory.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]