Community
Participate
Working Groups
What steps will reproduce the problem? 1. Switched to Spring Boot 2.2 with AutoValue -- Error Details -- Date: Thu May 24 12:26:12 CEST 2018 Message: Exception thrown by Java annotation processor com.google.auto.value.processor.AutoValueProcessor@54cad21e Severity: Error Product: Eclipse 4.7.3.20180405-1200 (org.eclipse.epp.package.java.product) Plugin: org.eclipse.jdt.apt.pluggable.core Session Data: eclipse.buildId=4.7.3.M20180330-0640 java.version=1.8.0_152 java.vendor=Oracle Corporation BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=pl_PL Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product Exception Stack Trace: java.lang.Exception: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:169) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:135) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:933) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:443) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:419) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:372) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:187) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:305) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.determineSourceStart(TypeElementImpl.java:88) at org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.getSourceStart(TypeElementImpl.java:71) at org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:64) at org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:1) at java.util.TimSort.binarySort(TimSort.java:296) at java.util.TimSort.sort(TimSort.java:221) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1462) at java.util.Collections.sort(Collections.java:175) at org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.getEnclosedElements(TypeElementImpl.java:165) at com.google.auto.value.processor.BuilderMethodClassifier.copyOfMethods(BuilderMethodClassifier.java:512) at com.google.auto.value.processor.BuilderMethodClassifier.checkSetterParameter(BuilderMethodClassifier.java:427) at com.google.auto.value.processor.BuilderMethodClassifier.classifyMethodOneArg(BuilderMethodClassifier.java:382) at com.google.auto.value.processor.BuilderMethodClassifier.classifyMethod(BuilderMethodClassifier.java:248) at com.google.auto.value.processor.BuilderMethodClassifier.classifyMethods(BuilderMethodClassifier.java:181) at com.google.auto.value.processor.BuilderMethodClassifier.classify(BuilderMethodClassifier.java:132) at com.google.auto.value.processor.BuilderSpec$Builder.defineVars(BuilderSpec.java:190) at com.google.auto.value.processor.AutoValueProcessor.defineVarsForType(AutoValueProcessor.java:869) at com.google.auto.value.processor.AutoValueProcessor.processType(AutoValueProcessor.java:516) at com.google.auto.value.processor.AutoValueProcessor.process(AutoValueProcessor.java:199) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) ... 24 more
Can you provide an example example project?
Sorry for some delay. Here is the project which fails with similar problem https://github.com/jawpio/eclipse-autovalue-fail and link to bug reported in autovalue itself https://github.com/google/auto/issues/652
Issue is also reproducible with eclipse "eclipse.buildId=4.8.0.I20180611-0500"
Looking at the given example, the bug appears to be in this fragment. Can you confirm please? @AutoValue.CopyAnnotations(exclude = Valid.class) @Valid @NotNull public abstract ColumnRestrictionsDto getColumn();
(In reply to Jay Arthanareeswaran from comment #4) > Looking at the given example, the bug appears to be in this fragment. Can > you confirm please? > > @AutoValue.CopyAnnotations(exclude = Valid.class) > @Valid > @NotNull > public abstract ColumnRestrictionsDto getColumn(); It will also help if you can tell us what the processor is trying to do. Surely if the test case can wait two months, this is not critical? Just wondering.
Yes I can confirm that this is causing the issue: > Looking at the given example, the bug appears to be in this fragment. Can > you confirm please? > > @AutoValue.CopyAnnotations(exclude = Valid.class) > @Valid > @NotNull > public abstract ColumnRestrictionsDto getColumn(); The strange thing is that in some other parts it works correctly (even though the same annotations are present). What AutoValue is trying to do is to generate the implementation class for the abstract class where generated >getColumn()< method cannot have the @Valid annotation. Basically this issue made me(and some other people) switch from Eclipse to IntelliJ already, and the issue is blocker in our further development using eclipse.
Any luck with this issue?
(In reply to Hello ItsMe from comment #7) > Any luck with this issue? Sorry, I meant to update this sooner, but this fell between cracks. IIRC, I tried but couldn't reproduce with the gradle project you shared. Perhaps, I am doing it the right away. Could you help me reproduce by putting this in a simple Eclipse/Java project? TIA!
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.