aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-27 14:12:04 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-27 14:16:43 +0700
commit33bd2b4a2e30de544ec2bb8a90997e8b6595b13c (patch)
tree44aad3ad26aafc922bc373e2b418aa251d26605e
parent8a933427ec77859a40c5cd9c55226bbe6f9d736a (diff)
downloadaspectj-33bd2b4a2e30de544ec2bb8a90997e8b6595b13c.tar.gz
aspectj-33bd2b4a2e30de544ec2bb8a90997e8b6595b13c.zip
Use upstream method to generate '--add-reads', '--add-exports' info
and copy it into our FileSystem instance. In order to be able to access JDT Core's FileSystem.moduleUpdates field, we had to make it public there first. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java11
-rw-r--r--pom.xml2
2 files changed, 9 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index c1bc570cc..75f8c36cd 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -1044,9 +1044,14 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
for (int i = 0; i < cps.size(); i++) {
classpaths[i] = cps.get(i);
}
- //FileSystem fileSystem = getLibraryAccess(classpaths, filenames);
- // TODO: This will probably fail other tests, it is just an experiment
- FileSystem fileSystem = buildConfig.getBuildArgParser().getLibraryAccess();
+ FileSystem fileSystem = getLibraryAccess(classpaths, filenames);
+
+ // Use upstream method to generate '--add-reads', '--add-exports' info and copy it into our FileSystem instance.
+ // See https://github.com/eclipse/org.aspectj/issues/145.
+ FileSystem fileSystemTemp = buildConfig.getBuildArgParser().getLibraryAccess();
+ fileSystem.moduleUpdates = fileSystemTemp.moduleUpdates;
+ fileSystemTemp.cleanup();
+
environment = new StatefulNameEnvironment(fileSystem, state.getClassNameToFileMap(), state);
state.setFileSystem(fileSystem);
state.setNameEnvironment(environment);
diff --git a/pom.xml b/pom.xml
index 71fb2bd66..b5b640a9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- Dependency versions -->
- <jdt.core.version>1.9.9</jdt.core.version>
+ <jdt.core.version>1.9.10-SNAPSHOT</jdt.core.version>
<asm.version>9.2</asm.version>
<lib.ant.version>1.6.3</lib.ant.version>
<lib.ant.xerces.version>2.6.2</lib.ant.xerces.version>