Browse Source

fix warnings in build - support .isJava8 option in build

tags/V1_8_10
Andy Clement 7 years ago
parent
commit
3714f91628

+ 0
- 3
ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java View File

@@ -14,11 +14,8 @@
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.

+ 14
- 4
build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java View File

@@ -224,15 +224,20 @@ public class AntBuilder extends Builder {
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;
}
@@ -269,8 +274,13 @@ public class AntBuilder extends Builder {
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;

BIN
lib/build/build.jar View File


+ 1
- 0
testing-client/.isJava5 View File

@@ -0,0 +1 @@

+ 4
- 4
testing/src/org/aspectj/internal/tools/ant/taskdefs/Ajctest.java View File

@@ -818,8 +818,8 @@ public class Ajctest extends Task implements PropertyChangeListener {
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) {
@@ -827,8 +827,8 @@ public class Ajctest extends Task implements PropertyChangeListener {
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);
}

+ 5
- 5
weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java View File

@@ -105,11 +105,11 @@ public class Java15PointcutExpressionTest extends TestCase {
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

Loading…
Cancel
Save