We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The error "cannot find symbol" is triggered on compiling of maven.
To Reproduce An example of the bug has been made in a test project that is able on this link: https://www.dropbox.com/s/gu1m48h2wlgtnlf/TestLombok.rar?dl=1
So firstly we make a class that is annotated with @UtilityClass, then make a random function like this.
package en.test.lombok; import lombok.experimental.UtilityClass; @UtilityClass public class Utility { public void anyFunction(){ } }
After we need to call the function anyFunction using a static import in another class like this.
anyFunction
package en.test.lombok; import static en.test.lombok.Utility.anyFunction; public class Main { public static void main(String[] args) { } }
After we configure the pom to use the annotation processors:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.example</groupId> <artifactId>TestLombok</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.22</version> <scope>compile</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.22</version> </path> </annotationProcessorPaths> </configuration> </plugin> </plugins> </build> <properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> </properties> </project>
An it should not compile due to the "cannot find symbol" error.
Expected behavior It should just compile normally.
Version info (please complete the following information):
Additional context This can be fixed by just using the * instead on the function name like this: import static en.test.lombok.Utility.*;
import static en.test.lombok.Utility.*;
The text was updated successfully, but these errors were encountered:
This is a duplicate of #2044
Sorry, something went wrong.
No branches or pull requests
Describe the bug
The error "cannot find symbol" is triggered on compiling of maven.
To Reproduce
An example of the bug has been made in a test project that is able on this link: https://www.dropbox.com/s/gu1m48h2wlgtnlf/TestLombok.rar?dl=1
So firstly we make a class that is annotated with @UtilityClass, then make a random function like this.
After we need to call the function
anyFunction
using a static import in another class like this.After we configure the pom to use the annotation processors:
An it should not compile due to the "cannot find symbol" error.
Expected behavior
It should just compile normally.
Version info (please complete the following information):
Additional context
This can be fixed by just using the * instead on the function name like this:
import static en.test.lombok.Utility.*;
The text was updated successfully, but these errors were encountered: