diff options
author | Andy Clement <aclement@pivotal.io> | 2016-11-07 13:04:55 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-11-07 13:04:55 -0800 |
commit | de34df77ea7f7372894cf1e2352766118a798e98 (patch) | |
tree | e0d75970e19c61af1ba204810ee1ebebbd1e8166 /org.aspectj.matcher | |
parent | 64c97807a20105644f604fe9b5263acdb63bd41d (diff) | |
download | aspectj-de34df77ea7f7372894cf1e2352766118a798e98.tar.gz aspectj-de34df77ea7f7372894cf1e2352766118a798e98.zip |
Upgraded to new JDT compiler - neon.1 and a bit
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/testsrc/org/aspectj/weaver/patterns/VisitorTestCase.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/org.aspectj.matcher/testsrc/org/aspectj/weaver/patterns/VisitorTestCase.java b/org.aspectj.matcher/testsrc/org/aspectj/weaver/patterns/VisitorTestCase.java index 40d39359e..7fd131528 100644 --- a/org.aspectj.matcher/testsrc/org/aspectj/weaver/patterns/VisitorTestCase.java +++ b/org.aspectj.matcher/testsrc/org/aspectj/weaver/patterns/VisitorTestCase.java @@ -15,7 +15,6 @@ import junit.framework.TestCase; import java.util.HashSet; import java.util.Set; -import java.util.Iterator; import java.io.LineNumberReader; import java.io.FileReader; @@ -28,8 +27,8 @@ import org.aspectj.weaver.patterns.TypePattern; */ public class VisitorTestCase extends TestCase { - private Set pointcuts = new HashSet(); - private Set typePatterns = new HashSet(); + private Set<String> pointcuts = new HashSet<>(); + private Set<String> typePatterns = new HashSet<>(); protected void setUp() throws Exception { super.setUp(); @@ -41,7 +40,7 @@ public class VisitorTestCase extends TestCase { rt.close(); } - private void feed(LineNumberReader r, Set set) throws Exception { + private void feed(LineNumberReader r, Set<String> set) throws Exception { for (String line = r.readLine(); line != null; line = r.readLine()) { set.add(line); } @@ -51,8 +50,7 @@ public class VisitorTestCase extends TestCase { if (pointcuts.isEmpty()) { fail("Empty pointcuts file!"); } - for (Iterator iterator = pointcuts.iterator(); iterator.hasNext();) { - String pointcut = (String) iterator.next(); + for (String pointcut: pointcuts) { try { DumpPointcutVisitor.check(pointcut); } catch (Throwable t) { @@ -66,8 +64,7 @@ public class VisitorTestCase extends TestCase { if (typePatterns.isEmpty()) { fail("Empty typePatterns file!"); } - for (Iterator iterator = typePatterns.iterator(); iterator.hasNext();) { - String tp = (String) iterator.next(); + for (String tp: typePatterns) { try { TypePattern p = new PatternParser(tp).parseTypePattern(); DumpPointcutVisitor.check(p, true); |