maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r406182 - /maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
Date Sun, 14 May 2006 01:43:00 GMT
Author: brett
Date: Sat May 13 18:42:59 2006
New Revision: 406182

URL: http://svn.apache.org/viewcvs?rev=406182&view=rev
Log:
[MSUREFIRE-99] load other classloader first to keep commons-logging happy

Modified:
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java?rev=406182&r1=406181&r2=406182&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
(original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
Sat May 13 18:42:59 2006
@@ -204,11 +204,13 @@
         //noinspection CatchGenericClass,OverlyBroadCatchBlock
         try
         {
+            // The test classloader must be constructed first to avoid issues with commons-logging
until we properly
+            // separate the TestNG classloader
+            ClassLoader testsClassLoader = createClassLoader( classPathUrls, childDelegation,
true );
+
             ClassLoader surefireClassLoader =
                 createClassLoader( surefireClassPathUrls, getClass().getClassLoader(), true
);
 
-            ClassLoader testsClassLoader = createClassLoader( classPathUrls, childDelegation,
true );
-
             Class surefireClass = surefireClassLoader.loadClass( Surefire.class.getName()
);
 
             Object surefire = surefireClass.newInstance();
@@ -628,8 +630,9 @@
         Object[] paramObjects = null;
         if ( paramProperty != null )
         {
-            String[] params = StringUtils.split( StringUtils.replace( paramProperty, "||",
"| |" ), "|" );
-            String[] types = StringUtils.split( StringUtils.replace( typeProperty, "||",
"| |" ), "|" );
+            // bit of a glitch that it need sto be done twice to do an odd number of vertical
bars (eg |||, |||||).
+            String[] params = StringUtils.split( StringUtils.replace( StringUtils.replace(
paramProperty, "||", "| |" ), "||", "| |" ), "|" );
+            String[] types = StringUtils.split( StringUtils.replace( StringUtils.replace(
typeProperty, "||", "| |" ), "||", "| |" ), "|" );
 
             paramObjects = new Object[params.length];
 



Mime
View raw message