From 8753511e73d4b72330752886cb9d5e9d0f5943ae Mon Sep 17 00:00:00 2001 From: YCHARAN Date: Tue, 10 Mar 2026 18:52:24 +0530 Subject: [PATCH 1/2] Improve sentence in README for clarity --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49602c130203..d84023d8b43c 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,5 @@ instructions for reporting a bug ### Contributing -Please see [CONTRIBUTING](CONTRIBUTING.md) for more info. +For information on how to contribute to Apache Tomcat, please see +[CONTRIBUTING.md](CONTRIBUTING.md). From b52d80268c1c176f80516b04895911757f6f4140 Mon Sep 17 00:00:00 2001 From: YCHARAN Date: Sat, 14 Mar 2026 22:07:20 +0530 Subject: [PATCH 2/2] Add additional unit tests for compute and computeIfAbsent in ParameterMap --- .../catalina/util/TestParameterMap.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/test/org/apache/catalina/util/TestParameterMap.java b/test/org/apache/catalina/util/TestParameterMap.java index 87ead7f60243..92d801a32b88 100644 --- a/test/org/apache/catalina/util/TestParameterMap.java +++ b/test/org/apache/catalina/util/TestParameterMap.java @@ -300,11 +300,37 @@ public void testEntrySetImmutabilityAfterLocked() { Assert.fail("ParameterMap is not locked."); } catch (UnsupportedOperationException expectedException) { } - try { entrySet.clear(); Assert.fail("ParameterMap is not locked."); } catch (UnsupportedOperationException expectedException) { } } + @Test + public void testComputeIfAbsentAfterLocked() { + ((ParameterMap) paramMap).setLocked(true); + + try { + paramMap.computeIfAbsent("param5", k -> new String[]{"value5"}); + Assert.fail("ParameterMap is not locked."); + } catch (IllegalStateException expectedException) { + } + } + + @Test + public void testComputeAfterLocked() { + ((ParameterMap) paramMap).setLocked(true); + + try { + paramMap.compute("param1", (k, v) -> new String[]{"changed"}); + Assert.fail("ParameterMap is not locked."); + } catch (IllegalStateException expectedException) { + } + } + + @Test + public void testEmptyParameterMap() { + Map map = new ParameterMap<>(); + Assert.assertTrue(map.isEmpty()); + } } \ No newline at end of file