Skip to content

Common: Fix copy-pasted Javadoc referring to methods in DynFields - #17244

Draft
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:docs/dynfields-javadoc-method-to-field
Draft

Common: Fix copy-pasted Javadoc referring to methods in DynFields#17244
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:docs/dynfields-javadoc-method-to-field

Conversation

@thswlsqls

@thswlsqls thswlsqls commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • DynFields was copied from DynMethods, and several Javadoc comments kept the original DynMethods wording.
  • The class comment said callers "invoke the wrapped method"; the class wraps a java.lang.reflect.Field.
  • bind(Object), buildChecked(Object) and build(Object) said they return a BoundMethod; they return a BoundField.
  • buildChecked(Object) said it throws NoSuchMethodException; its signature throws NoSuchFieldException.
  • @throws and @param text said "method"/"receiver" where the code binds a field to a target, and asStatic()/buildStatic() said "if the method is not static".
  • Corrected these 12 lines to match the signatures; the sibling DynMethods the comments came from shows the correct terms. Javadoc-only, no signature or bytecode change.

Testing done

  • No test added — wording only, no behavior change.
  • ./gradlew :iceberg-common:spotlessApply :iceberg-common:spotlessCheck — BUILD SUCCESSFUL (JDK 21).

AI Disclosure

  • Tool: Claude Code — used to analyze the code and correct the documentation.

DynFields was copied from DynMethods, but several Javadoc comments kept
DynMethods terms. They described method/BoundMethod/NoSuchMethodException
and receiver where the code returns BoundField, throws NoSuchFieldException,
and binds to a target field. Correct the wording to match the signatures.

Generated-by: Claude Code
@thswlsqls
thswlsqls marked this pull request as draft July 17, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant