import java.io.File;
import java.util.List;
-import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil;
-import com.sun.org.apache.xml.internal.serializer.utils.Utils;
-
/**
* A long way to go until full coverage, but this is the place to add more.
Path path = new Path(project);
boolean hasSourceDirectories = false;
boolean isJava5Compile = false;
+ boolean isJava8Compile = false;
for (File file: result.getSrcDirs()) {
// for (Iterator iter = result.getSrcDirs().iterator(); iter.hasNext();) {
// File file = (File) iter.next();
path.createPathElement().setLocation(file);
if (!isJava5Compile
- && (Util.Constants.JAVA5_SRC.equals(file.getName()) || Util.Constants.JAVA5_TESTSRC.equals(file.getName()) || new File(
- file.getParent(), ".isJava5").exists())) {
+ && (Util.Constants.JAVA5_SRC.equals(file.getName()) ||
+ Util.Constants.JAVA5_TESTSRC.equals(file.getName()) ||
+ new File(file.getParent(), ".isJava5").exists())) {
isJava5Compile = true;
}
+ if (new File(file.getParent(),".isJava8").exists()) {
+ isJava8Compile = true;
+ }
if (!hasSourceDirectories) {
hasSourceDirectories = true;
}
javac.setTarget("1.1"); // 1.1 class files - Javac in 1.4 uses 1.4
javac.setSource("1.3");
} else {
- javac.setSource("1.7");
- javac.setTarget("1.7");
+ if (isJava8Compile) {
+ javac.setSource("1.8");
+ javac.setTarget("1.8");
+ } else {
+ javac.setSource("1.7");
+ javac.setTarget("1.7");
+ }
}
// compile
boolean passed = false;
--- /dev/null
+
\ No newline at end of file
testsetToArgcombo.put(testset, argcombo);
}
while (!testsetToArgcombo.isEmpty()) {
- int _ = 1;
- for (Iterator<Testset> iter = testsets.iterator(); iter.hasNext(); _++) {
+ int testsetCounter = 1;
+ for (Iterator<Testset> iter = testsets.iterator(); iter.hasNext(); testsetCounter++) {
Testset testset = iter.next();
List<List<Arg>> argcombo = testsetToArgcombo.get(testset);
if (argcombo.size() == 0) {
continue;
}
List<Arg> args = argcombo.remove(0);
- final String startStr = "Testset " + _ + " of " + testsets.size();
- String str = startStr + " / Combo " + _ + " of " + argcombos.size();
+ final String startStr = "Testset " + testsetCounter + " of " + testsets.size();
+ String str = startStr + " / Combo " + testsetCounter + " of " + argcombos.size();
log("---------- " + str + " ----------");
execute(testset, args);
}
PointcutExpression pexpr = null;
ShadowMatch match = null;
- Method n = test.AnnoValues.class.getMethod("none",null);
- Method r = test.AnnoValues.class.getMethod("redMethod",null);
- Method g = test.AnnoValues.class.getMethod("greenMethod",null);
- Method b = test.AnnoValues.class.getMethod("blueMethod",null);
- Method d = test.AnnoValues.class.getMethod("defaultMethod",null);
+ Method n = test.AnnoValues.class.getMethod("none");
+ Method r = test.AnnoValues.class.getMethod("redMethod");
+ Method g = test.AnnoValues.class.getMethod("greenMethod");
+ Method b = test.AnnoValues.class.getMethod("blueMethod");
+ Method d = test.AnnoValues.class.getMethod("defaultMethod");
pexpr = p.parsePointcutExpression("execution(@test.A3(test.Color.RED) public void *(..))");
assertTrue("Should match", pexpr.matchesMethodExecution(n).neverMatches()); // default value RED