belingueres commented on code in PR #1376:
URL: https://github.com/apache/maven-scm/pull/1376#discussion_r3377280308


##########
maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java:
##########
@@ -44,6 +44,41 @@
 public final class SvnCommandLineUtils {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(SvnCommandLineUtils.class);
 
+    /**
+     * Factory interface for creating {@link Commandline} instances.
+     * The default implementation simply returns {@code new Commandline()}.
+     * Tests may replace it via {@link 
#setCommandlineFactory(CommandlineFactory)}
+     * to return a subclass that captures environment variables, arguments, 
etc.
+     */
+    @FunctionalInterface
+    public interface CommandlineFactory {
+        Commandline create();
+    }
+
+    /**
+     * Default factory: plain {@code new Commandline()} — production behaviour.
+     */
+    private static final CommandlineFactory DEFAULT_FACTORY = Commandline::new;
+
+    /**
+     * Active factory. Replaced only in tests; never {@code null}.
+     */
+    private static CommandlineFactory commandlineFactory = DEFAULT_FACTORY;

Review Comment:
   The factory is meant just for testing. Not really to be used in 
multi-threaded executions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to