JDK27 removed com.sun.tools.javac.tree.EndPosTable and stores end
positions directly on tree nodes (JDK-8372948). Lombok resolved that
class in a static initializer and rethrew on failure, so the processor
never initialized and every compilation on JDK27 failed.
- Javac: probe for EndPosTable; when absent, use the no-arg
DiagnosticPosition.getEndPosition() and write JCTree.endpos directly
- CommentCatcher: skip setting genEndPos where the field no longer exists
- new java27 parser factory: JDK27 dropped the keepEndPositions
parameter from JavacParser and ParserFactory.newParser
- DocCommentIntegrator: implement the new no-arg getEndPosition()
- PrettyPrinter: drop an unused reflective getEndPosition lookup that
would fail class init on JDK27
- add an opt-in test.javac27 target
Fixes#4072
Per PR #4013 review, swap the boolean `lombok.addCheckReturnValueAnnotation`
for an enum-valued `lombok.checkReturnValueAnnotation` (values: `none`,
`lombok`; default: `none`). This leaves room for additional flavors
(`jetbrains`, `errorprone`, `custom: FQN`) in future releases without
another key rename, and for flipping the default to `lombok` after a
release cycle or two.
# Conflicts:
# doc/changelog.markdown
Adds the annotation to @With, @WithBy, @Builder.build(), and @SuperBuilder.build() methods. Controlled via lombok.addCheckReturnValueAnnotation config key (default: true). Static analysis tools (Error Prone, IntelliJ, SpotBugs) recognize @CheckReturnValue by simple name and will warn when the return value is discarded.
Add JacksonizedAccessorsJackson3 test case verifying that @Jacksonized
with jacksonVersion=3 emits the correct annotations.
Add expected warning messages for tests that have both Jackson 2 and 3
on the classpath without explicit version configuration, and fix
JacksonizedSuperBuilderWithJsonDeserialize message expectations.
Add tools.jackson.databind.annotation and tools.jackson.dataformat.xml.annotation
entries to the Jackson annotation copy lists, so that Jackson 3 databind and
format-specific annotations are correctly copied to getters, setters, and builders.
Update both javac and eclipse handlers to emit Jackson 3 databind
annotations (@JsonDeserialize, @JsonPOJOBuilder) when configured via
lombok.jacksonized.jacksonVersion.
# Conflicts:
# src/core/lombok/javac/handlers/HandleJacksonized.java