Skip to content

[fs] Declare serialVersionUID in COSNLoader for Serializable consistency#8555

Open
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/cosn-loader-serialversionuid
Open

[fs] Declare serialVersionUID in COSNLoader for Serializable consistency#8555
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/cosn-loader-serialversionuid

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

  • FileIOLoader is @Public and extends Serializable, so its implementations are serialized.
  • Among the loaders using the PluginFileIO pattern (OBSLoader, OSSLoader, S3Loader, GSLoader, AzureLoader, COSNLoader), COSNLoader is the only one that declares serialVersionUID on its inner PluginFileIO but omits it on the outer loader class.
  • Declaring it pins the UID to 1L instead of relying on the compiler-computed value, aligning COSNLoader with the other five loaders.

Tests

  • Consistency change with no behavior change — no test added (matches the sibling loaders, which declare serialVersionUID without dedicated tests; the thin loader modules have no src/test).
  • mvn -pl paimon-filesystems/paimon-cosn -DfailIfNoTests=false clean install passed (spotless / checkstyle / rat / enforcer) on JDK 11.

FileIOLoader is @public and extends Serializable. Among the loaders
using the PluginFileIO pattern (OBS/OSS/S3/GS/Azure/COSN), COSNLoader is
the only one that declares serialVersionUID on its inner PluginFileIO but
not on the outer loader class. Add it to align with the other five and
pin the serialization UID instead of relying on the compiler-computed one.

Generated-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant