]> source.dussan.org Git - aspectj.git/commitdiff
reduced min Java version to 1.6
authorAndy Clement <aclement@pivotal.io>
Sat, 17 Dec 2016 00:32:49 +0000 (16:32 -0800)
committerAndy Clement <aclement@pivotal.io>
Sat, 17 Dec 2016 00:32:49 +0000 (16:32 -0800)
build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java
lib/build/build.jar
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AdviceDeclaration.java
testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
util/src/org/aspectj/util/LangUtil.java

index 107905231c086e23bf264eba0bb6fad3abe05f58..aeb9b11b7bad3e0f8990bd123f16bc6f5fedda54 100644 (file)
@@ -278,8 +278,9 @@ public class AntBuilder extends Builder {
                                javac.setSource("1.8");
                                javac.setTarget("1.8");                         
                        } else {
-                               javac.setSource("1.7");
-                               javac.setTarget("1.7");
+                               // min
+                               javac.setSource("1.6");
+                               javac.setTarget("1.6");
                        }
                }
                // compile
index 28a3fea05bf39280fb4c80924b14bc537ec19137..8a6f93714091c382e12f9d003d54cb9ee6343d5a 100644 (file)
Binary files a/lib/build/build.jar and b/lib/build/build.jar differ
index 0d6e90d4c62b7bbbc2277c5f94e420301abd55ab..f833c00071107f0241dde436f1a16dc1f862e165 100644 (file)
@@ -65,7 +65,7 @@ public class AdviceDeclaration extends AjMethodDeclaration {
        public int adviceSequenceNumberInType;
 
        public MethodBinding proceedMethodBinding; // set during this.resolveStaments, referenced by Proceed
-       public List<Proceed> proceedCalls = new ArrayList<>(2); // populated during Proceed.findEnclosingAround
+       public List<Proceed> proceedCalls = new ArrayList<Proceed>(2); // populated during Proceed.findEnclosingAround
 
        private boolean proceedInInners;
        private ResolvedMember[] proceedCallSignatures;
index 6705a584760bbbab03fefd4b7934c482e70815a7..18b9233dc1cd46a4502844d9d531f7074dbd38ed 100644 (file)
@@ -24,10 +24,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.commons.digester.Digester;
 import org.aspectj.apache.bcel.classfile.Attribute;
 import org.aspectj.apache.bcel.classfile.JavaClass;
@@ -39,6 +35,12 @@ import org.aspectj.apache.bcel.util.SyntheticRepository;
 import org.aspectj.tools.ajc.AjcTestCase;
 import org.aspectj.tools.ajc.CompilationResult;
 import org.aspectj.util.FileUtil;
+import org.aspectj.weaver.ResolvedMember;
+import org.aspectj.weaver.ResolvedType;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
 
 /**
  * Root class for all Test suites that are based on an AspectJ XML test suite file. Extends AjcTestCase allowing a mix of
@@ -463,5 +465,23 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
     return new File(getClass().getResource(resourceName).getFile());
   }
 
+       protected Method findMethod(JavaClass jc, String string) {
+               for (Method m : jc.getMethods()) {
+                       if (m.getName().equals(string)) {
+                               return m;
+                       }
+               }
+               return null;
+       }
+
+       protected ResolvedMember findMethod(ResolvedType outerType, String string) {
+               for (ResolvedMember method: outerType.getDeclaredMethods()) {
+                       if (method.getName().equals(string)) {
+                               return method;
+                       }
+               }
+               return null;
+       }
+
        
 }
index b0bf145225e91d7fb7064589c002e2d8bca88ce0..1d832508b50ac07712c7f44aad87b8e3ea08f0d2 100644 (file)
@@ -933,7 +933,7 @@ public class LangUtil {
                if ((null == array) || (1 > array.length)) {
                        return Collections.emptyList();
                }
-               ArrayList<T> list = new ArrayList<>();
+               ArrayList<T> list = new ArrayList<T>();
                list.addAll(Arrays.asList(array));
                return list;
        }