This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new dcc50e2139 Unit tests
dcc50e2139 is described below

commit dcc50e21399010ffe7a55ecc9421c1eddc4f2d96
Author: James Bognar <[email protected]>
AuthorDate: Mon Dec 1 18:00:23 2025 -0800

    Unit tests
---
 TODO-completed.md                                  |  8 ++++++++
 TODO.md                                            | 22 ++--------------------
 .../{ParamInfoTest.java => ParameterInfoTest.java} |  4 ++--
 .../apache/juneau/rest/arg/ArgException_Test.java  | 18 +++++++++---------
 4 files changed, 21 insertions(+), 31 deletions(-)

diff --git a/TODO-completed.md b/TODO-completed.md
index 423d76f8ab..5f004164bb 100644
--- a/TODO-completed.md
+++ b/TODO-completed.md
@@ -9,6 +9,14 @@ This file contains TODO items that have been completed and 
moved from TODO.md.
   - **Completed**: October 31, 2025
   - **Total changes**: 276 files modified, 915 insertions(+), 859 deletions(-)
   
+- **TODO-87** ✅ Replace remaining `ParamInfo` references with `ParameterInfo`.
+  - **Status**: COMPLETED
+  - **Details**: Removed the legacy `ParamInfoTest`, replacing it with 
`ParameterInfoTest`, updated all test references (including variable 
names/comments) to use `ParameterInfo`, and ensured the active codebase no 
longer mentions `ParamInfo` outside of archived static Javadocs from prior 
releases.
+  
+- **TODO-88** ✅ Eliminate need for AssertionArgs in BctAssertions by allowing 
DEFAULT_CONVERTER to be overridden and resettable.
+  - **Status**: COMPLETED
+  - **Details**: Introduced a thread-local resettable converter supplier 
(defaulting to `BasicBeanConverter.DEFAULT`), added 
`setConverter()`/`resetConverter()` APIs, removed the `AssertionArgs` class, 
updated all assertion signatures to take a leading `Supplier<String>` for 
custom messages, refreshed docs/javadocs, and migrated the BCT tests to the new 
API.
+  
   ### Phase 1: Break up compound declarations (26 instances)
   - **Pattern**: `Type var1 = ..., var2 = ...;` → `var var1 = ...; var var2 = 
...;`
   - **Files**: 15+ files including HtmlSerializerSession.java, 
BeanSession.java, RemoteOperationMeta.java, etc.
diff --git a/TODO.md b/TODO.md
index 85ec6d7c7e..b5d3c79845 100644
--- a/TODO.md
+++ b/TODO.md
@@ -7,7 +7,6 @@ This file tracks pending tasks for the Apache Juneau project. 
For completed item
 ## Issues to Fix
 
 - [ ] TODO-3 Figure out why CallLogger and ThrownStore objects are not 
automatically injected into REST classes in spring boot.
-- [ ] TODO-87 Find references to `ParamInfo` and replace them with 
`ParameterInfo` throughout the codebase.
 
 ## Code Quality Improvements
 
@@ -15,32 +14,15 @@ This file tracks pending tasks for the Apache Juneau 
project. For completed item
 - [ ] TODO-6 Investigate if there are any other W3 or RFC specifications that 
would make good candidates for new bean modules.
 - [ ] TODO-12 Tests for Spring Boot testing.
 - [ ] TODO-14 The name parameter on annotations like Query when used on method 
parameters should be optional if parameter names are persisted in the bytecode.
-- [ ] TODO-15 It appears StringUtils is going to become a commonly-used 
external class. Let's see if we can enhance it with commonly used string 
utility methods.
+- [x] TODO-15 It appears StringUtils is going to become a commonly-used 
external class. Let's see if we can enhance it with commonly used string 
utility methods.
 - [ ] TODO-27 Determine if there are any other good candidates for 
Stringifiers and Listifiers.
 - [ ] TODO-29 Finish setting up SonarQube analysis in git workflow.
-- [x] TODO-51 Convert local variable declarations to use `var` keyword where 
type is explicit on right-hand side.
-  - **Phase 1**: ✅ Break up compound declarations (completed - 26 instances)
-  - **Phase 2**: ✅ Convert safe patterns in local variable declarations 
(completed - 276 files)
 - [ ] TODO-54 Search for places in code where Calendar should be replaced with 
ZonedDateTime.
-- [x] TODO-73 Move reflection classes (ClassInfo, ConstructorInfo, 
ExecutableInfo, FieldInfo, MethodInfo, ParamInfo, AnnotationInfo, 
AnnotationList) from org.apache.juneau.reflect to 
org.apache.juneau.common.reflect. ✅ COMPLETED - All classes moved, 196+ files 
updated, 25,839 tests passing. See TODO-reflectionMigrationPlan.md and 
REFLECTION_MIGRATION_COMPLETE.md for details.
-- [x] TODO-74 Add missing high-priority methods to ClassInfo to make it a 
complete replacement for java.lang.Class. ✅ COMPLETED - Added 8 methods 
including getClassLoader(), getDeclaringClass(), getEnclosingClass(), etc.
-- [x] TODO-75 Add missing medium-priority methods to ClassInfo for enhanced 
functionality. ✅ COMPLETED - Added 10 methods including getCanonicalName(), 
isRecord(), isSealed(), getGenericSuperclass(), etc.
-- [x] TODO-76 Add missing low-priority methods to ClassInfo for comprehensive 
API coverage. ✅ COMPLETED - Added 15 methods including getModule(), 
getNestHost(), getProtectionDomain(), arrayType(), etc.
-- [x] TODO-77 Update ClassInfo.CACHE to use Juneau's Cache object for better 
cache management. ✅ COMPLETED - Replaced ConcurrentHashMap with Cache object 
supporting eviction and statistics.
-- [x] TODO-78 Add missing methods to ExecutableInfo to make it a complete 
replacement for java.lang.reflect.Executable. ✅ COMPLETED - Added 13 methods 
including getModifiers(), isSynthetic(), isVarArgs(), getAnnotation(), 
getGenericExceptionTypes(), toGenericString(), etc. All 25,872 tests passing.
-- [x] TODO-79 Add missing methods to ParamInfo to make it a complete 
replacement for java.lang.reflect.Parameter. ✅ COMPLETED - Added 12 methods 
including getDeclaringExecutable(), getModifiers(), isNamePresent(), 
isImplicit(), isSynthetic(), isVarArgs(), getParameterizedType(), 
getAnnotatedType(), getAnnotations(), getDeclaredAnnotations(), 
getAnnotationsByType(), getDeclaredAnnotationsByType(). All 25,872 tests 
passing.
-- [x] TODO-80 Add missing methods to FieldInfo to make it a complete 
replacement for java.lang.reflect.Field. ✅ COMPLETED - Added 10 methods (7 
high-priority + 3 medium-priority) including getModifiers(), isSynthetic(), 
isEnumConstant(), getGenericType(), getAnnotatedType(), getAnnotations(), 
getDeclaredAnnotations(), getAnnotationsByType(), 
getDeclaredAnnotationsByType(), toGenericString(). All 25,872 tests passing.
-- [x] TODO-81 Add missing methods to MethodInfo to make it a complete 
replacement for java.lang.reflect.Method. ✅ COMPLETED - Added 4 methods 
(isBridge already existed) including getGenericReturnType(), 
getAnnotatedReturnType(), getDefaultValue(), isDefault(). All 25,872 tests 
passing.
-- [x] TODO-82 Add missing methods to ConstructorInfo to make it a complete 
replacement for java.lang.reflect.Constructor. ✅ COMPLETED - Added 1 method: 
newInstance() as standard API alias for invoke(). All 25,872 tests passing.
-- [x] TODO-83 Refactor reflection hierarchy to introduce AccessibleInfo base 
class. ✅ COMPLETED - Created AccessibleInfo to mirror 
java.lang.reflect.AccessibleObject, extracted common annotation and 
accessibility methods from ExecutableInfo and FieldInfo. New hierarchy: 
AccessibleInfo (base) -> ExecutableInfo -> MethodInfo/ConstructorInfo, and 
AccessibleInfo -> FieldInfo. All 25,872 tests passing.
-- [x] TODO-85 Add missing methods to AnnotationInfo to make it a drop-in 
replacement for java.lang.annotation.Annotation. ✅ COMPLETED - Added 3 methods: 
annotationType(), hashCode(), equals(). AnnotationInfo now provides complete 
API compatibility with java.lang.annotation.Annotation while maintaining Juneau 
enhancements for context tracking and annotation hierarchy searching. All 
25,872 tests passing.
-- [x] TODO-86 Add PackageInfo class as a wrapper for java.lang.Package. ✅ 
COMPLETED - Created PackageInfo with caching, complete Package API 
implementation (getName(), getSpecificationTitle/Version/Vendor(), 
getImplementationTitle/Version/Vendor(), isSealed(), isCompatibleWith(), 
annotation methods), Juneau enhancements (hasAnnotation(), hasNoAnnotation()), 
and factory methods (of(Package), of(Class), of(ClassInfo)). Updated 
ClassInfo.getPackage() to return PackageInfo. All 25,872 tests  [...]
 
 ## Framework Improvements
 
-- [ ] TODO-19 ClassInfo improvements to getMethod (e.g. getMethodExact vs 
getMethod).
+- [x] TODO-19 ClassInfo improvements to getMethod (e.g. getMethodExact vs 
getMethod).
 - [ ] TODO-21 Thrown NotFound causes - javax.servlet.ServletException: Invalid 
method response: 200
-- [x] TODO-88 Eliminate need for AssertionArgs in BctAssertions by allowing 
DEFAULT_CONVERTER to be overridden and resettable. ✅ COMPLETED - Implemented 
thread-local converter with setConverter()/resetConverter() methods, removed 
AssertionArgs class entirely, replaced with Supplier<String> for messages. All 
tests updated and passing.
 - [ ] TODO-89 Add ClassInfoTyped
 
 ## HTTP Response/Exception Improvements
diff --git 
a/juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParamInfoTest.java
 
b/juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParameterInfoTest.java
similarity index 99%
rename from 
juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParamInfoTest.java
rename to 
juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParameterInfoTest.java
index 3d505e776c..2075d68572 100644
--- 
a/juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParamInfoTest.java
+++ 
b/juneau-utest/src/test/java/org/apache/juneau/common/reflect/ParameterInfoTest.java
@@ -33,9 +33,9 @@ import org.junit.jupiter.api.*;
 import org.apache.juneau.annotation.Name;
 
 /**
- * ParamInfo tests.
+ * ParameterInfo tests.
  */
-class ParamInfoTest extends TestBase {
+class ParameterInfoTest extends TestBase {
 
        private static String originalDisableParamNameDetection;
 
diff --git 
a/juneau-utest/src/test/java/org/apache/juneau/rest/arg/ArgException_Test.java 
b/juneau-utest/src/test/java/org/apache/juneau/rest/arg/ArgException_Test.java
index 1f0bb453a2..e809234b2d 100644
--- 
a/juneau-utest/src/test/java/org/apache/juneau/rest/arg/ArgException_Test.java
+++ 
b/juneau-utest/src/test/java/org/apache/juneau/rest/arg/ArgException_Test.java
@@ -30,34 +30,34 @@ import org.junit.jupiter.api.*;
 
 class ArgException_Test extends TestBase {
 
-       private static ParameterInfo testParamInfo;
+       private static ParameterInfo testParameterInfo;
 
        @BeforeAll
        public static void setup() throws Exception {
-               // Create a test ParamInfo for a sample method parameter
+               // Create a test ParameterInfo for a sample method parameter
                var mi = 
MethodInfo.of(ArgException_Test.class.getMethod("sampleMethod", String.class));
-               testParamInfo = mi.getParameter(0);
+               testParameterInfo = mi.getParameter(0);
        }
 
        public static void sampleMethod(String param) {
-               // Sample method for creating ParamInfo
+               // Sample method for creating ParameterInfo
        }
 
        @Test void a01_basic() {
-               var x = new ArgException(testParamInfo, "Test message");
+               var x = new ArgException(testParameterInfo, "Test message");
                assertNotNull(x);
                assertTrue(x.getMessage().contains("Test message"));
                assertTrue(x.getMessage().contains("parameter 0"));
        }
 
        @Test void a02_withArgs() {
-               var x = new ArgException(testParamInfo, "Test {0} {1}", "foo", 
"bar");
+               var x = new ArgException(testParameterInfo, "Test {0} {1}", 
"foo", "bar");
                assertTrue(x.getMessage().contains("Test foo bar"));
                assertTrue(x.getMessage().contains("parameter 0"));
        }
 
        @Test void a03_fluentSetters() {
-               var x = new ArgException(testParamInfo, "Test");
+               var x = new ArgException(testParameterInfo, "Test");
 
                // Test setMessage returns same instance for fluent chaining
                assertSame(x, x.setMessage("New message"));
@@ -106,7 +106,7 @@ class ArgException_Test extends TestBase {
 
        @Test void a04_fluentChaining() {
                // Test multiple fluent calls can be chained
-               var x = new ArgException(testParamInfo, "Initial")
+               var x = new ArgException(testParameterInfo, "Initial")
                        .setHeaders(l(BasicHeader.of("X-Chain", "chained")))
                        .setContent("Chained content");
 
@@ -115,7 +115,7 @@ class ArgException_Test extends TestBase {
 
        @Test void a05_copy() {
                // Test that copy() returns correct type
-               var x = new ArgException(testParamInfo, "Original message");
+               var x = new ArgException(testParameterInfo, "Original message");
 
                ArgException copy = x.copy();
 

Reply via email to