This is an automated email from the ASF dual-hosted git repository. papegaaij pushed a commit to branch wicket-9.x in repository https://gitbox.apache.org/repos/asf/wicket.git
commit be6ce16baf7ff1a92fc5f8c0e7f84b509d24d28f Author: Emond Papegaaij <[email protected]> AuthorDate: Wed Aug 19 13:36:51 2026 +0200 Clarify two constants in the resource URL and upload limit tests PARENT_STEPS carried four lines explaining why the count is what it is. One per sub-package, plus one for the style and one for the component, says the same thing. The value is unchanged: the expression counts package components, which is one more than the number of dots. OVERSIZED said it was over every limit configured below it, which reads oddly next to LARGE, a megabyte and a hundred times its size. LARGE is a part size rather than a limit, so each now says which it is. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --- .../markup/html/form/upload/FileUploadServletPartLimitsTest.java | 7 ++++--- .../request/resource/ResourceUrlAttributeValidationTest.java | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/upload/FileUploadServletPartLimitsTest.java b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/upload/FileUploadServletPartLimitsTest.java index d32e72e806..9c237038f0 100644 --- a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/upload/FileUploadServletPartLimitsTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/upload/FileUploadServletPartLimitsTest.java @@ -87,12 +87,13 @@ import org.junit.jupiter.api.Test; */ class FileUploadServletPartLimitsTest extends WicketTestCase { - /** Comfortably over every limit configured below. */ + /** Comfortably over {@link #LIMIT}, the only limit these tests configure. */ private static final int OVERSIZED = 10_000; /** - * The size of the form field part. Large enough that buffering it would be unmistakably deliberate - * rather than a rounding error, small enough to be harmless in a test. + * The size of the form field part. Not a limit, but a size at which buffering the part would be + * unmistakably deliberate rather than a rounding error; still small enough to be harmless in a + * test. */ private static final int LARGE = 1 << 20; diff --git a/wicket-core/src/test/java/org/apache/wicket/request/resource/ResourceUrlAttributeValidationTest.java b/wicket-core/src/test/java/org/apache/wicket/request/resource/ResourceUrlAttributeValidationTest.java index 5543281659..1e77e14b72 100644 --- a/wicket-core/src/test/java/org/apache/wicket/request/resource/ResourceUrlAttributeValidationTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/request/resource/ResourceUrlAttributeValidationTest.java @@ -61,10 +61,8 @@ public class ResourceUrlAttributeValidationTest extends WicketTestCase ResourceUrlAttributeValidationTest.class.getPackageName().replace('.', '/') + "/"; /** - * How many {@code ../} the style needs to reach the root the finder resolves against. The style - * is appended as {@code <package>/<name>_<style>}, so its first {@code ..} is glued onto - * {@code PublicPage_} and forms a literal path component rather than a parent reference - hence - * one extra, plus one to consume that component itself. + * For every sub-package we need to move up one directory with {@code ../}, plus one for the + * style and one for the component. */ private static final int PARENT_STEPS = ResourceUrlAttributeValidationTest.class.getPackageName().split("\\.").length + 2;
