[FLINK-35733] Change org.jetbrains.annotations.NotNull to javax.annotation.Nonnull
What is the purpose of the change
Change org.jetbrains.annotations.NotNull to javax.annotation.Nonnull
Brief change log
Change org.jetbrains.annotations.NotNull to javax.annotation.Nonnull
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving): (yes / no) - The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): (yes / no / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
- The S3 file system connector: (yes / no / don't know)
Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
CI report:
- 719788eefb8f6615e097752ea94d37d98eac3500 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
Hi, @1996fanrui Could you help have a look if you had the free time ? Thank you~
I would suggest to add this to checkstyle rules
<module name="RegexpSinglelineJava">
<property name="format" value="^import org.jetbrains.annotations."/>
<property name="message" value="Use import javax.annotation."/>
</module>
This will fail the build both on ci and local in case of violations
I would suggest to add this to checkstyle rules
<module name="RegexpSinglelineJava"> <property name="format" value="^import org.jetbrains.annotations."/> <property name="message" value="Use import javax.annotation."/> </module>This will fail the build both on ci and local in case of violations
Thanks @snuyanzin for providing the tool.
I'm not sure should we limit all annotations inside of org.jetbrains.annotations. Could we only limit the org.jetbrains.annotations.NotNull and org.jetbrains.annotations.Nullable?
Also @RocMarshal , would you mind squashing all current commits into one commit? They are tiny change, and not deserved to import too many commits. But, adding the checkstyle as a separate commit makes sense to me.
I'm not sure should we limit all annotations inside of org.jetbrains.annotations. Could we only limit the org.jetbrains.annotations.NotNull and org.jetbrains.annotations.Nullable?
yes, you can put there the full name like
<module name="RegexpSinglelineJava">
<property name="format" value="^import org.jetbrains.annotations.Nullable;$"/>
<property name="message" value="Use import javax.annotation.Nullable"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="^import org.jetbrains.annotations.NotNull;$"/>
<property name="message" value="Use import javax.annotation.NotNull"/>
</module>