Add checkstyle rules fit for v2 - #7325
Conversation
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |
…g tests to it/ Relocates the marshaller, unmarshaller, and Mapper*Utils classes under an internal/ package, and moves the four tests that make real AWS calls to src/it/java per the v2 layout convention. Adds the v1-coupled S3Link and table-admin tests to the compiler testExcludes until those ports land.
Appendix: full annotation classification
|
mapper v2 house cleaning PR
dynamodb-mapper(mapper v2) is a faithful 1:1 port of the EOL v1 DynamoDBMapper.Enabling the full v2 checkstyle ruleset would rename public types, change signatures,
reorder members, and add code absent from v1. That turns the port into a refactor: harder
to diff against v1, and a risk to behavior.
This PR is house-cleaning to fit the module into the v2 repo without touching runtime
behavior. Every commit is either mechanical or low-discretion; the split below marks which.
Commits
1. Checkstyle allowlist + SDK annotations (mechanical, some discretion)
Instead of the full ruleset we allowlist 3 rules:
finalon locals across 17 files. Mechanical.@SdkPublicApi@SdkInternalApi@SdkProtectedApi2. Repo layout (mechanical)
Moved marshallers/unmarshallers/utils under
internal/; moved AWS-credentialed integ tests tosrc/it/. Package-relative moves, no code changes.3. Swap remaining v1 imports + logging (mechanical)
Remaining v1 SDK imports → v2 equivalents;
commons-logging→ SLF4J.4. Remove dead code (mechanical)
Deleted unused
DynamoDBReflector/ReflectionUtils; removed deprecatedRequestMetricCollectorfrom config (no v2 equivalent).5. Restore data-plane functional tests (mechanical)
Un-excluded the DynamoDB Local functional tests that only use table admin for fixture setup (data-plane coverage, runs on the raw v2 client). Pure table-admin and S3Link tests stay excluded pending their ports.
6. Replace log4j 1.x with log4j2 (mechanical)
Swapped the log4j 1.x test dep for the SDK-standard
log4j-api/log4j-core/log4j-slf4j-impl(bom-managed); replacedlog4j.propertieswithlog4j2.xml.Not in this PR (deferred to dedicated port PRs)
Table-admin/GSI port, S3Link port, and the v1-coupled tests they block.
ReflectionUtilsstays@Deprecateduntil then.