]> source.dussan.org Git - aspectj.git/commitdiff
longhand of recent Java API *sigh*
authoraclement <aclement>
Fri, 12 May 2006 11:44:29 +0000 (11:44 +0000)
committeraclement <aclement>
Fri, 12 May 2006 11:44:29 +0000 (11:44 +0000)
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java

index 3d70759c83bf3b959509463c20da0ee54ec326e6..f656a1c2104a9b488f00bd9472962f1d3d53aa51 100644 (file)
@@ -625,7 +625,14 @@ public class AjcTestCase extends TestCase {
        }
 
        private String substituteSandbox(String classpath) {
-               return classpath.replace("$sandbox", ajc.getSandboxDirectory().getAbsolutePath());
+               // the longhand form of the non 1.3 API: classpath.replace("$sandbox", ajc.getSandboxDirectory().getAbsolutePath());
+               while (classpath.indexOf("$sandbox")!=-1) {
+                       int pos = classpath.indexOf("$sandbox");
+                       String firstbit = classpath.substring(0,pos);
+                       String endbit = classpath.substring(pos+8);
+                       classpath = firstbit+ ajc.getSandboxDirectory().getAbsolutePath()+endbit;
+               }
+               return classpath;
        }
     
     /**