aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 1.9.7.M2V1_9_7_M2Alexander Kriegisch2021-05-241-1/+1
| | | | | | Also depend on JDT Core 1.9.7.M2 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Use canonical snapshot version 1.9.7-SNAPSHOTAlexander Kriegisch2021-05-231-1/+1
| | | | | | | | | Before, we used 1.9.7.BUILD-SNAPSHOT, which according to Andy Clement was originally an intent across a group of Spring projects he was involved in, to ensure that SNAPSHOTS were sorted alphabetically ahead of MILESTONEs and ahead of RCs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Provision libraries in 'lib' automaticallyAlexander Kriegisch2021-05-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon special request by Andy Clement, I included 'lib' as a child module in the parent POM again, making several modules which refer to downloaded library files dependent the 'lib' module. I am not sure I caught all of them, but I hope so. Now after cloning the project and configuring the token for reading from GitHub Packages (sorry!), you can just run a Maven build for the main project and no longer need to fail the first build, read the Maven Enforcer message and run 'cd lib && mvn compile' as a first step. This convenience comes at the price of a more complex POM and two new profiles: - Profile 'provision-libs' is auto-activated by the absence of a marker file, kicking off the library provisioning process and creating same marker file at the end, if successful. Therefore, during subsequent builds libraries will not be re-provisioned, because the marker file exists and Maven skips all download and (un)zip steps, which saves build time and bandwidth. Otherwise offline builds would not work either. - Profile 'clean-libs' needs to be activated manually, because by default 'mvn clean' will not erase provisioned libraries. In most cases, even after a clean a developer does not want to re-provision all libraries if they have not changed (e.g. new JDT Core build). But if you do wish too erase the libraries and the marker file, just call 'cd lib && mvn -P clean-libs clean'. Please note: The Maven Enforcer build step, which additionally checks for existence of other files, still exists and was moved from the parent POM to 'libs'. No matter if provisioning was just done or skipped because the main marker file exists, a quick heuristic check for that list of files is done during each build, failing the build with a comprehensive message if an inconsistency was found. The error message says which files are missing and tells the user: "There is an inconsistency in module subdirectory 'lib'. Please run 'mvn --projects lib -P clean-libs clean compile'. This should take care of cleaning and freshly downloading all necessary libraries to that directory, where some tests expect them to be." This should cover the topic. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove redundant 'name' and 'packaging' tags from POMsAlexander Kriegisch2021-04-151-10/+6
| | | | | | | If 'name' is identical to 'artifactId' and 'packaging' has the default value 'jar', we can just remove those tags from the POM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* 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
|