aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Enable type parameter traversal in exact type patternsAlexander Kriegisch2024-04-121-1/+1
| | | | | | Closes #221 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* LangUtil: remove methods like 'is11VMOrGreater', 'is1dot5VMOrGreater'Alexander Kriegisch2024-02-192-2/+2
| | | | | | | | | | Replace them by a uniform method 'isVMGreaterOrEqual(double)', also overloaded for int. This gets rid of one 'AspectJ_JDK_Update' tag. One less place to check and update with each newly supported Java version. :-) Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix PointcutRewriterTest, add LogicalPointcutStructure test helper classAlexander Kriegisch2023-01-152-169/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | After WildTypePattern.hashCode was fixed in the previous commit, PointcutRewriterTest started failing, because in many places it was falsely relying on a specific order of hash codes, which cannot be guaranteed, especially since more instance fields are part of the hash code now in accordance with 'equals'. The new test helper class LogicalPointcutStructure is able to recognise chained '&&' and '||' pointcuts of the same logical nesting level, un-nesting them from the actual pointcut structure and making them comparable, disregarding their order. I.e., something like ((A && B) && C) && D is actually recognised to logically be A && B && C && D and equivalent to e.g. either of D && B && A && C A && B && D && C C && A && D && B This helps to compare rewritten pointcuts, as long as their logical structure has not been altered. Relates to #24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Merge pull request #102 from turbanoff/trim_trailing_whitespacesAndy Clement2021-11-301-1/+1
|\ | | | | Trim trailing whitespaces.
| * Trim trailing whitespaces.Andrey Turbanov2021-11-201-1/+1
| | | | | | | | | | Trailing whitespaces are useless. Most of code-styles forbids them. Most of editors always trim them on save. I propose to clean up project from trailing whitespaces in all java files at once.
* | Replace uses of StringBuffer with StringBuilder.Andrey Turbanov2021-11-201-1/+1
|/ | | | StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
* Upgrade license from CPLv1/EPLv1 to EPLv2Alexander Kriegisch2021-06-0429-264/+264
| | | | | | | This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix some deprecated Java and JUnit warnings by using newer API callsAlexander Kriegisch2021-03-211-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* polishAndy Clement2020-08-161-7/+6
|
* Merge branch 'master' into feature/collection-performanceAndy Clement2020-08-153-3/+0
|\
| * Cleanup unused importsLars Grefer2020-08-163-3/+0
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Redundant Collection.addAll() callLars Grefer2020-08-151-2/+1
| | | | | | | | | | | | 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-152-2/+2
|/ | | | | | | 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>
* Remove checks for old Java VersionsLars Grefer2020-08-132-16/+4
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Use the diamond operator where possibleLars Grefer2020-08-134-6/+6
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary boxingLars Grefer2020-08-081-8/+8
| | | | | | 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-081-1/+1
| | | | | | 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-0812-75/+68
| | | | | | 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>
* Add module tests back in - but streamlinedAndy Clement2019-02-011-0/+56
|
* mavenized org.aspectj.matcher - finishedAndy Clement2019-01-235-93/+3
|
* mavenized org.aspectj.matcher module - wipAndy Clement2019-01-2338-0/+6638