You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2026/02/02 13:15:53 UTC

(maven-shared-utils) branch non created (now 20c3e89)

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

elharo pushed a change to branch non
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git


      at 20c3e89  Combine declaration and initialization

This branch includes the following new commits:

     new 20c3e89  Combine declaration and initialization

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-shared-utils) 01/01: Combine declaration and initialization

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch non
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit 20c3e8907a5fd67111e46c65e22ed0cba87208f7
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Feb 2 07:15:40 2026 -0600

    Combine declaration and initialization
---
 .../maven/shared/utils/introspection/ReflectionValueExtractor.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractor.java b/src/main/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractor.java
index 70d3464..3d365eb 100644
--- a/src/main/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractor.java
+++ b/src/main/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractor.java
@@ -263,9 +263,8 @@ public class ReflectionValueExtractor {
                 ClassMap classMap = getClassMap(value.getClass());
                 // use get method on List interface
                 Object[] localParams = new Object[] {index};
-                Method method = null;
                 try {
-                    method = classMap.findMethod("get", localParams);
+                    Method method = classMap.findMethod("get", localParams);
                     return method.invoke(value, localParams);
                 } catch (AmbiguousException e) {
                     throw new IntrospectionException(e);