aboutsummaryrefslogtreecommitdiffstats
path: root/testing/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure Java 14-only tests using preview are not executed on JVM 15+Alexander Kriegisch2021-03-141-0/+31
| | | | | | | | | | | Some Ajc196 tests are using preview features (see .../ajc196.xml), i.e. they will fail on Java 15+ because code compiled with '--enable-preview' can only run on the same JVM version, not on a more recent one. Hence, the preview-using tests are now being excluded in order to make the build run on Java 15, even though no Java 15 features are present in the current 1.9.7 snapshot. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve text matching in OutputSpec, fixing some failing Windows testsAlexander Kriegisch2021-03-141-25/+20
| | | | | | | | | | | | | | | | | | Some Java 14 text block tests failed on Windows because a StringTokenizer was used to split by LF, but the Windows line separator is CR+LF. Because a multi-line string ending with CR+LF is printed via 'System.out.println' in the test code, another CR+LF is added to the output, resulting in trailing CR+LF+CR+LF. Hence, between the two LFs, the tokenizer actually found an additional line consisting of CR (only on Windows, of course). Despite each line token actually containing a trailing CR token, that did not matter much because 'String.trim' was used everywhere before comparing values. Anyway, the improved OutputSpec uses text.trim().split("\\s*\n\\s*"), which takes care of leading/trailing whitespace both around the whole output and for each separate line. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix 'ajdoc' tests for Java 15 buildAlexander Kriegisch2021-03-143-48/+48
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix: WeaveSpec no longer ignores the '-Xlintfile' parameterAlexander Kriegisch2021-03-121-18/+23
| | | | | | | | | | | | | | | | | | | Some tests in ajc150.xml and ajc190_from150.xml contain '<weave ...>' build steps with 'xlintfile="..."' parameters. Those parameters were passed through to Java and aspect code building steps, but not to the final weaving step, sometimes leading to spurious "type not exposed to weaver" warnings which occurred for some local and CI builds, but not always. Very strange indeed. Anyway, by making method WeaveSpec.buildWeaveArgs() pass on this parameter, the tests seem to run reliably now. TODO: Why does Ajc report that warning if the application JAR is on the inpath and the aspect JAR is on the aspectpath? Is it because a marker annotation is defined within the aspect JAR? But actually, that should not matter, especially not work once and fail at other times. I guess there is a class loading order problem or similar involved. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Unify classpath handling in CompileSpec & RunSpecAlexander Kriegisch2021-03-112-11/+7
| | | | | | | | | | | | | Replace directory separator '/' and surrogate path separator ',' by platform-specific separators File.separatorChar and File.pathSeparatorChar, respectively. Also make sure that replacement occurs during write access, not read access. This was handled differently in both sibling classes. I am not sure if that helps to fix any Linux CI tests, but it is worth a try. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove unnecessary interface modifiersLars Grefer2020-08-179-242/+242
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* polishAndy Clement2020-08-163-194/+197
|
* Merge branch 'master' into feature/collection-performanceAndy Clement2020-08-1515-19/+3
|\
| * Cleanup unused importsLars Grefer2020-08-1618-18/+0
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
| * Update to JUnit 4.13Lars Grefer2020-08-153-6/+3
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Weaken Collection declarationsLars Grefer2020-08-1525-72/+68
| | | | | | | | | | | | Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Redundant Collection.addAll() callLars Grefer2020-08-157-30/+17
| | | | | | | | | | | | Reports Collection.addAll() and Map.putAll() calls after instantiation of a collection using a constructor call without arguments. Such constructs can be replaced with a single call to a parametrized constructor which simplifies code. Also for some collections the replacement might be more performant. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Collection.toArray() call styleLars Grefer2020-08-151-1/+1
| | | | | | | | | | | | | | There are two styles to convert a collection to an array: either using a pre-sized array (like c.toArray(new String[c.size()])) or using an empty array (like c.toArray(new String[0]). In older Java versions using pre-sized array was recommended, as the reflection call which is necessary to create an array of proper size was quite slow. However since late updates of OpenJDK 6 this call was intrinsified, making the performance of the empty array version the same and sometimes even better, compared to the pre-sized version. Also passing pre-sized array is dangerous for a concurrent or synchronized collection as a data race is possible between the size and toArray call which may result in extra nulls at the end of the array, if the collection was concurrently shrunk during the operation. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Manual array copyLars Grefer2020-08-151-6/+2
| | | | | | | | | | | | Reports the manual copying of array contents which may be replaced by calls to System.arraycopy(). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Collections.sort() can be replaced with List.sort()Lars Grefer2020-08-153-5/+5
| | | | | | | | | | | | Reports calls to Collections.sort(list, comparator) which could be replaced with list.sort(comparator). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Manual array to collection copyLars Grefer2020-08-153-16/+4
|/ | | | | | Reports the copying of array contents to a collection where each element is added individually using a for loop. Such constructs may be replaced by a call to Collection.addAll(Arrays.asList()) or Collections.addAll(). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Merge branch 'master' of github.com:eclipse/org.aspectj into ↵Lars Grefer2020-08-142-5/+6
|\ | | | | | | remove-old-version-checks
| * Attempting to get J11 build happy at githubAndy Clement2020-08-131-4/+0
| |
| * Making tests behave on 11Andy Clement2020-08-131-1/+6
| |
* | Simplify checks for Java 8 to trueLars Grefer2020-08-141-1/+1
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Remove checks for old Java VersionsLars Grefer2020-08-131-4/+4
|/ | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Use the diamond operator where possibleLars Grefer2020-08-1317-48/+48
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary unboxingLars Grefer2020-08-089-10/+10
| | | | | | Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary boxingLars Grefer2020-08-083-5/+5
| | | | | | Reports explicit boxing, i.e. wrapping of primitive values in objects. Explicit manual boxing is unnecessary under Java 5 and newer, and can be safely removed. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'String.indexOf()' expression is replaceable with 'contains()'Lars Grefer2020-08-0816-32/+32
| | | | | | Reports any String.indexOf() expressions which can be replaced with a call to the String.contains() method available in Java 5 and newer. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'for' loop replaceable with enhanced 'for' loopLars Grefer2020-08-0838-810/+748
| | | | | | Reports for loops which iterate over collections or arrays, and can be replaced with an enhanced for loop (i.e. the foreach iteration syntax). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* PolishAndy Clement2020-07-221-323/+332
|
* Include JDTCore for Java14Andy Clement2020-04-204-27/+55
|
* polishAndy Clement2019-11-294-1723/+1765
|
* polishAndy Clement2019-11-2834-169/+273
|
* Fix 550494Andy Clement2019-11-271-20/+19
|
* Java 13 supportAndy Clement2019-11-252-16/+50
|
* Updated with Java12 supportAndy Clement2019-04-035-6/+59
|
* windows compatibility in testsAndy Clement2019-03-031-1/+4
|
* improved test harnesses for working with runtimeAndy Clement2019-02-191-0/+1
|
* add missing licenseAndy Clement2019-02-111-0/+12
|
* polishAndy Clement2019-02-115-29/+29
|
* better test tidyupAndy Clement2019-02-112-6/+7
|
* tidyupAndy Clement2019-02-081-0/+1
|
* Fix getSpecFile() to work with URLs and adjust installer unpackerAndy Clement2019-02-083-6/+10
|
* Add module tests back in - but streamlinedAndy Clement2019-02-012-3/+64
|
* various polish to previously mavenized projects to support newer onesAndy Clement2019-01-312-16/+18
|
* mavenizing testing - doneAndy Clement2019-01-3089-207/+0
|
* mavenizing testing - wipAndy Clement2019-01-30110-0/+6828
|
* Upgraded test infra to support building/running modulesAndy Clement2017-10-203-3/+21
|
* fix warnings in build - support .isJava8 option in buildV1_8_10Andy Clement2016-12-091-4/+4
|
* Fix 500035: handling target only binding in @AJ pointcutAndy Clement2016-11-186-97/+89
|
* enabling AJDT to use annotation processorsAndy Clement2014-08-201-0/+8
|
* genericsAndy Clement2012-03-021-16/+16
|
* genericsAndy Clement2012-03-021-7/+7
|