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 2025/03/31 12:07:31 UTC

(maven) branch static created (now 201e74186e)

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

elharo pushed a change to branch static
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 201e74186e not static

This branch includes the following new commits:

     new 201e74186e not static

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) 01/01: not static

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

elharo pushed a commit to branch static
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 201e74186e973d5836fd04af3085439cf666a302
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Mar 31 08:06:55 2025 -0400

    not static
---
 .../java/org/apache/maven/AbstractCoreMavenComponentTestCase.java | 2 +-
 .../java/org/apache/maven/impl/model/DefaultInterpolatorTest.java | 7 +++----
 .../java/org/apache/maven/api/di/testing/MavenDIExtension.java    | 8 ++++----
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/impl/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java b/impl/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
index e5808efe9f..33e155a266 100644
--- a/impl/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
+++ b/impl/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
@@ -216,7 +216,7 @@ protected List<ArtifactRepository> getRemoteRepositories() throws InvalidReposit
         repository.setReleases(policy);
         repository.setSnapshots(policy);
 
-        return Arrays.asList(mavenRepositorySystem.buildArtifactRepository(repository));
+        return Arrays.asList(MavenRepositorySystem.buildArtifactRepository(repository));
     }
 
     protected List<ArtifactRepository> getPluginArtifactRepositories() throws InvalidRepositoryException {
diff --git a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/DefaultInterpolatorTest.java b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/DefaultInterpolatorTest.java
index 867bd7decf..2995900e15 100644
--- a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/DefaultInterpolatorTest.java
+++ b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/DefaultInterpolatorTest.java
@@ -215,15 +215,14 @@ private String substVars(
             Map<String, String> configProps,
             UnaryOperator<String> callback,
             boolean defaultsToEmptyString) {
-        return new DefaultInterpolator()
-                .substVars(val, currentKey, null, configProps, callback, null, defaultsToEmptyString);
+        return DefaultInterpolator.substVars(val, currentKey, null, configProps, callback, null, defaultsToEmptyString);
     }
 
     private String substVars(String val, String currentKey) {
-        return new DefaultInterpolator().substVars(val, currentKey, null, null, null, null, true);
+        return DefaultInterpolator.substVars(val, currentKey, null, null, null, null, true);
     }
 
     private String substVars(String val, String currentKey, Map<String, String> configProps) {
-        return new DefaultInterpolator().substVars(val, currentKey, null, configProps);
+        return DefaultInterpolator.substVars(val, currentKey, null, configProps);
     }
 }
diff --git a/impl/maven-testing/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java b/impl/maven-testing/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
index 7d97c7628f..40603619e2 100644
--- a/impl/maven-testing/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
+++ b/impl/maven-testing/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
@@ -77,7 +77,7 @@ public void beforeEach(ExtensionContext context) throws Exception {
      * @param context The extension context to store
      */
     protected void setContext(ExtensionContext context) {
-        this.context = context;
+        MavenDIExtension.context = context;
     }
 
     /**
@@ -90,10 +90,10 @@ protected void setContext(ExtensionContext context) {
     protected void setupContainer() {
         try {
             injector = Injector.create();
-            injector.bindInstance(ExtensionContext.class, this.context);
-            injector.discover(this.context.getRequiredTestClass().getClassLoader());
+            injector.bindInstance(ExtensionContext.class, context);
+            injector.discover(context.getRequiredTestClass().getClassLoader());
             injector.bindInstance(Injector.class, injector);
-            injector.bindInstance((Class) this.context.getRequiredTestClass(), this.context.getRequiredTestInstance());
+            injector.bindInstance((Class) context.getRequiredTestClass(), context.getRequiredTestInstance());
         } catch (Exception e) {
             throw new IllegalArgumentException("Failed to create DI injector.", e);
         }