aboutsummaryrefslogtreecommitdiffstats
path: root/ajde.core/src/main/java
Commit message (Collapse)AuthorAgeFilesLines
* Add Java23 supportAndrew Clement2025-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The huge change with adopting Java23 is that 1.1 > 1.7 Java are now considered unsupported by Eclipse JDT, so the many thousands of tests we have that were specifying java versions lower than 1.8 were all failing with an unsupported version error. All those tests have had their versions bumped to 1.8.

That is why this commit includes so many changes. For example where we were specifying 1.5 - which was the case for many many generics/annotations tests, that is now 1.8. Also, some tests have been deleted because they make no sense now (verifying expected errors on Java 1.4 for example, errors that just can’t happen with minimum Java level 1.8). The biggest impact to tests was when bumping above 1.4 compliance suddenly there were 100s of adviceDidNotMatch messages. Some of these messages were actual indications of bad expectations in the test but many of them were just to-be-expected and were fixed either via an -Xlint:ignore option in the test spec or a SuppressAjWarnings in the test source.

One or two tests actually revealed real bugs that just didn’t surface with lower level java versions specified. A bare minimum of real Java 23 tests have been added just to get this sanity tested and committed. More would ideally be added. Other notable changes due to Eclipse JDT changes: org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/*.java Changes in here because there are now more validations on the code generator methods we were calling. Now you can’t start manipulating variables without having declared them as proper local variables, so those extra calls to define them have been added.
 org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom With needing to bump up the java versions, these classes had to be brought up to date with AST.JLS20 rather than only supporting versions 2/3. This was mostly copying patterns for the Eclipse classes.


* Reduce 'Object' class usageAndrey Turbanov2022-04-151-2/+2
|
* 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-0410-108/+108
| | | | | | | This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix incorrect HTML entities in javadoc commentsJerry James2020-09-141-2/+2
|
* Remove unnecessary interface modifiersLars Grefer2020-08-172-55/+55
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Weaken Collection declarationsLars Grefer2020-08-151-1/+1
| | | | | | 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-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-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>
* Fix up tests and reduce verbosity on J11Andy Clement2020-08-141-16/+15
|
* Use the diamond operator where possibleLars Grefer2020-08-132-5/+5
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'while' loop replaceable with enhanced 'for' loopLars Grefer2020-08-081-3/+2
| | | | | | Reports while loops which iterate over collections, and can be replaced with an enhanced for loop (i.e. foreach iteration syntax). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'for' loop replaceable with enhanced 'for' loopLars Grefer2020-08-081-4/+4
| | | | | | 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>
* mavenizing ajde.core - doneAndy Clement2019-01-2910-0/+1251