Cannot find symbol when using the current module as an import
Josiah Noel
josiahnoel at gmail.com
Tue Apr 8 02:12:16 UTC 2025
Hey team,
So I tried to modify some annotation processors to use the current module
as an import to see if I could reduce the number of imports I have
to generate. Unfortunately, it looks like when I use the current module as
an import, it can't read the imports of its dependencies.
Suppose I have:
module example {
requires com.fasterxml.jackson.databind;
}
And I try:
> import module example;
> class Example {
void main() {
var mapper = new ObjectMapper(); //Cannot find symbol
}
}
It fails to import the object mapper class.
--
Cheers, Josiah.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20250407/0bb77d83/attachment.htm>
More information about the compiler-dev
mailing list