slfan1989 opened a new pull request, #8421:
URL: https://github.com/apache/hadoop/pull/8421
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
#### Background
The `hadoop-cos` module currently uses `javax.annotation.Nullable` from the
legacy `javax.annotation-api` package. As part of the Jakarta EE transition, we
should migrate to `jakarta.annotation.Nullable`.
#### Changes
This patch migrates the `hadoop-cos` module from `javax.annotation` to
`jakarta.annotation` with minimal changes:
1. Dependency Management
- Added `jakarta.annotation:jakarta.annotation-api:2.1.1` to parent POM
(`hadoop-project/pom.xml`) dependency management
- Added `jakarta.annotation-api` dependency in `hadoop-cos` module POM
(version inherited from parent)
- Kept `javax.annotation-api` in parent for other modules (coexistence is
acceptable for now)
2. Code Changes
- Replaced `javax.annotation.Nullable` imports with
`jakarta.annotation.Nullable` in 3 files:
- AbstractCOSCredentialsProvider.java
- EnvironmentVariableCredentialsProvider.java
- SimpleCredentialsProvider.java
#### Compatibility
- No API changes - only package name updates
- `jakarta.annotation-api` 2.x uses `jakarta.annotation.*` namespace
- Both `javax.annotation-api` and `jakarta.annotation-api` can coexist in
classpath
- No runtime behavior changes expected
### How was this patch tested?
- Existing unit tests pass
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
### AI Tooling
If an AI tool was used:
- [ ] The PR includes the phrase "Contains content generated by <tool>"
where <tool> is the name of the AI tool used.
- [ ] My use of AI contributions follows the ASF legal policy
https://www.apache.org/legal/generative-tooling.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]