dashorst opened a new pull request, #1865:
URL: https://github.com/apache/wicket/pull/1865

   Removes the dependencies the dependency audit in #1862 found unused or 
declared in the wrong module. The two commits are independent and are best 
reviewed separately.
   
   **Replace commons-collections4 with JDK code.** Wicket used collections4 in 
three places: `LinkedMap` in `MarkupContainer`, 
`CollectionUtils.isEqualCollection` in `PageParameters.equals`, and 
`CollectionUtils.isEmpty` in `WicketTester`. The change that needs review is in 
`MarkupContainer`. Containers with more than 24 children now store them in a 
`LinkedHashMap`. Removing a single child from such a container walks the map to 
find the previous sibling (O(n), where `LinkedMap.previousKey` was O(1)); this 
is the same walk the list storage below 24 children already does. Adding, 
looking up and replacing children stay O(1). `PageParameters` keeps its 
order-insensitive comparison by counting occurrences.
   
   **Remove dependencies the modules don't use and declare the ones they do.** 
This commit only changes poms and module-info files:
   
   - wicket-ioc: drop `org.ow2.asm:asm` (byte-buddy shades its own copy).
   - wicket-tester, wicket-extensions-tester, wicket-native-websocket-tester: 
declare `junit-jupiter-api` instead of compile-scoped `assertj-core`, 
`junit-jupiter-engine` and `junit-jupiter-params`, none of which their code 
uses.
   - `commons-fileupload2-jakarta-servlet5` moves from wicket-util to 
wicket-core, the module that uses it.
   - `jakarta.enterprise:jakarta.enterprise.cdi-api` becomes 
`jakarta.cdi:jakarta.cdi-api`; 5.0.0 of the former is only a relocation.
   - The root pom drops `slf4j-ext`, which no module uses.
   - The test modules that got AssertJ or JUnit params through wicket-tester 
declare them in test scope.
   
   ## What applications see
   
   Draft for the migration guide:
   
   > Wicket no longer depends on commons-collections4, and wicket-tester no 
longer brings in AssertJ, the JUnit Jupiter engine or JUnit Jupiter params. 
wicket-ioc no longer brings in ASM. If your application or its tests use any of 
these, declare them as dependencies yourself. Without a JUnit engine on the 
test classpath no tests run, so check that your build declares 
`junit-jupiter-engine` (or `junit-jupiter`) in test scope.
   >
   > The serialized form of a `MarkupContainer` with more than 24 children has 
changed, so pages stored by an earlier Wicket version can't be read back after 
upgrading.
   
   ## Testing
   
   `mvn clean verify -Pjs-test` passes (6613 tests). The first commit also 
compiles on its own, including its tests. `dependency:analyze` no longer 
reports any of the findings this PR addresses.
   
   Not included, and left for #1862: the EL implementation in 
wicket-bean-validation, moving `jakarta.inject-api` out of wicket-ioc, and the 
root pom's blanket `slf4j-api`/`servlet-api` dependencies. The unbuilt 
`testing/` modules are tracked in #1863.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to