-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
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
Make the build JDK 18+ compatible #304
Conversation
I'll get back to this PR later on. I had checked out the branch however and the advertised
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed a workaround, but fine for me. 👍
5676b49
to
810fe58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit boiler-plate-y, but I agree it's nicer to keep the lint check enabled.
Suggested commit message:
Make the build JDK 18+ compatible (#304)
// For more details, see https://bugs.openjdk.org/browse/JDK-8274336. | ||
@SuppressWarnings("serial") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// For more details, see https://bugs.openjdk.org/browse/JDK-8274336. | |
@SuppressWarnings("serial") | |
@SuppressWarnings("serial" /* Concrete instance will be `Serializable`. */) |
@@ -36,6 +36,9 @@ public final class AmbiguousJsonCreator extends BugChecker implements Annotation | |||
private static final Matcher<AnnotationTree> IS_JSON_CREATOR_ANNOTATION = | |||
isType("com.fasterxml.jackson.annotation.JsonCreator"); | |||
|
|||
/** Instantiates the default {@link AmbiguousJsonCreator}. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The default" hints at there being a non-default instance, while in fact there can be zero or more equivalent instances. How about:
/** Instantiates the default {@link AmbiguousJsonCreator}. */ | |
/** Instantiates a new {@link AmbiguousJsonCreator} instance. */ |
(The three existing cases should be named "a default", as a contrast with "a customized".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, I see. I used the same sentence that we already used in a few places 😬.
810fe58
to
e69f82d
Compare
Should've marked it ready a bit sooner. Will merge once last part is 🟢 . |
e69f82d
to
5ecf901
Compare
@werli reported that he got some errors when running Error Prone Support with JDK 18.0.2.
After some investigation I found these two JDK bug reports:
The first one flagged quite some violations. To resolve these violations, the default non-arg constructors are added with Javadoc. This solution is not ideal. However by looking at the docs of the javadoc command, and more specifically the options, I don't see a way to configure the check to go around this...
For me, this check flags a lot of missing Javadocs during development. Therefore, it'd be a good idea to not disable this check and use this PR to make the code compatible with JDK 18.