aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder
Commit message (Collapse)AuthorAgeFilesLines
* Make BCEL classpath utility recognise Java 16-19, fixing many testsAlexander Kriegisch2021-03-211-1/+1
| | | | | | | | | | | | | | | | | This is a follow-up commit on @07af5d41: Inside org.aspectj.apache.bcel.util.ClassPath.getClassPath(), some JVM version matching occurs which previously did not include Java 16 (I also added 17-19 to the regex matcher). This fixes test errors like: java.lang.ClassCastException: class org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to class org.aspectj.weaver.ReferenceType (org.aspectj.weaver.MissingResolvedTypeWithKnownSignature and org.aspectj.weaver.ReferenceType are in unnamed module of loader 'app') Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix some deprecated Java and JUnit warnings by using newer API callsAlexander Kriegisch2021-03-212-8/+8
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Java 16 test suite for AspectJ 1.9.7 + test refactoringsAlexander Kriegisch2021-03-211-2/+2
| | | | | | | | | | | | | | | - Test all features which were preview in 14+15 and are now final in 16, compiling them with language level 16. - For Java 15 we only have sanity tests (and of course the Java <14 tests), compiling Java 16 features to target 15 does not seem to work. - Test remaining Java 16 preview feature (sealed classes). - Instead of overriding runTest(String) in several base classes like XMLBasedAjcTestCaseForJava*Only or XMLBasedAjcTestCaseForJava*OrLater, we now override setUp() from JUnit's TestCase base class. This will run before runTest(String) and make the tests fail much faster, if a user tries to run them on the wrong VM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Java 15 class vile version to BCEL constants, adjust test tools etc.Alexander Kriegisch2021-03-161-0/+6
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make BCEL classpath utility recognise Java 15, fixing many testsAlexander Kriegisch2021-03-131-5/+1
| | | | | | | | | | | | | | | | | | | | Inside org.aspectj.apache.bcel.util.ClassPath.getClassPath(), some JVM version matching occurs which previously did not include Java 15. Technically, AspectJ 1.9.6 does not support Java 15, but on GitHub Actions there is a build job running on a JVM 15. This change should at least make the weaver tests pass, making that test job more meaningful. This fixes test errors like java.lang.ClassCastException: class org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to class org.aspectj.weaver.ReferenceType (org.aspectj.weaver.MissingResolvedTypeWithKnownSignature and org.aspectj.weaver.ReferenceType are in unnamed module of loader 'app') Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Revert to 1.9.7.BUILD-SNAPSHOTAndy Clement2020-08-211-1/+1
|
* 1.9.7 milestone 1 publishedAndy Clement2020-08-211-1/+1
|
* Remove unnecessary interface modifiersLars Grefer2020-08-1711-870/+870
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* polishAndy Clement2020-08-166-7/+23
|
* Merge pull request #10 from larsgrefer/cleanup/pomAndy Clement2020-08-161-1/+0
|\ | | | | Cleanup the Maven pom.xml files
| * Remove project.parent.relative path as ../pom.xml is already the defaultLars Grefer2020-08-151-1/+0
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Merge branch 'master' into feature/collection-performanceAndy Clement2020-08-159-9/+0
|\ \
| * | Cleanup unused importsLars Grefer2020-08-1610-10/+0
| |/ | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Weaken Collection declarationsLars Grefer2020-08-156-27/+17
| | | | | | | | | | | | 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-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>
* | Single Map method can be usedLars Grefer2020-08-151-5/+1
| | | | | | | | | | | | Reports common usage patterns of java.util.Map that could be replaced with Java 8 methods: getOrDefault(), computeIfAbsent(), putIfAbsent(), merge(), or replaceAll(). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Collections.sort() can be replaced with List.sort()Lars Grefer2020-08-151-3/+3
| | | | | | | | | | | | 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-151-9/+2
|/ | | | | | 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>
* Use the diamond operator where possibleLars Grefer2020-08-1325-73/+73
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary unboxingLars Grefer2020-08-082-6/+6
| | | | | | 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-082-3/+3
| | | | | | 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-085-9/+9
| | | | | | 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>
* 'while' loop replaceable with enhanced 'for' loopLars Grefer2020-08-081-3/+1
| | | | | | 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-0835-322/+286
| | | | | | 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>
* Rev to 1.9.7.BUILD-SNAPSHOTAndy Clement2020-07-221-1/+1
|
* AspectJ 1.9.6 final bitsV1_9_6Andy Clement2020-07-221-1/+1
|
* Added basic ThreadLocalAwareRepository - groundwork for 561819Andy Clement2020-04-221-0/+111
|
* Include JDTCore for Java14Andy Clement2020-04-203-33/+38
|
* polishAndy Clement2019-11-2919-25/+30
|
* Move to 1.9.6.BUILD-SNAPSHOT versionAndy Clement2019-11-283-2/+3
|
* 1.9.5 release versions in pomsV1_9_5Andy Clement2019-11-281-1/+1
|
* Java 13 supportAndy Clement2019-11-252-23/+27
|
* Update to 1.9.5.BUILD-SNAPSHOT in pomsAndy Clement2019-06-031-1/+1
|
* 1.9.4 POMSAndy Clement2019-05-101-1/+1
|
* pushed versions to 1.9.4.BUILD-SNAPSHOTAndy Clement2019-04-171-1/+1
|
* Updated with Java12 supportAndy Clement2019-04-032-1/+7
|
* fix pom version and minor improvement to classpath calcAndy Clement2019-01-258-2/+86
|
* mavenizing bcel-builder - completeAndy Clement2019-01-24173-142/+19
|
* Change the mehtod name "containsField" to "findsField".Kui Liu2018-10-111-1/+1
| | | | | | | The method implements finding a field object in the 'fieldsList' with a given name. If found, return the found field object, otherwise return null. Thus, rename the method as "findsField" should be more clear than "containsField" since "containsField" is prone to ask whether the "fieldsFile" contains a field or not and return true or false. Signed-off-by: Kui Liu <brucekuiliu@gmail.com>
* More fixes for 1.9.2V1_9_2_RC2Andy Clement2018-10-017-57/+443
| | | | | | - update to more recent JDT to pickup Nestmates fix - bcel updated for NestMembers/NestHost attributes - testcases for nestmates
* 1.9.2.RC1 changesV1_9_2_RC1Andy Clement2018-09-297-4/+136
|
* Support Java10Andy Clement2018-04-182-9/+44
|
* Bug#531694: generate more optional thisJoinPoint construction codeAndy Clement2018-03-092-3/+5
| | | | | | | This commit introduces some new methods into the runtime Factory class and modifies code generation to use them (and to use the form of the LDC bytecode that loads class constants).
* Fix for Bug 531819 - Negative parameter annotation matching not behavingAndy Clement2018-02-281-0/+1
|
* Add missing cases to bcel constantToStringAndy Clement2018-02-077-0/+91
|
* Moved to packageAndy Clement2017-10-201-2/+2
|
* rebuilt internal dependenciesAndy Clement2017-10-201-0/+0
|
* Fixes Bug 525293 - Spring AOP could be fasterAndy Clement2017-09-281-5/+3
| | | | | | | Multiple changes here: - annotation unpacking is smarter and if it only needs runtime retention annotations it uses reflection and doesn't unpack the bytes to discover class level retention annotations. - Reflection worlds are shared if for the same classloader.
* Update project source/target levels to 1.7Andy Clement2017-09-271-4/+4
|