Bug 69935: Add short-based column setters to ClientAnchor#1006
Merged
pjfanning merged 3 commits intoapache:trunkfrom Feb 14, 2026
Merged
Bug 69935: Add short-based column setters to ClientAnchor#1006pjfanning merged 3 commits intoapache:trunkfrom
pjfanning merged 3 commits intoapache:trunkfrom
Conversation
Introduce short-based column setters on ClientAnchor to complement the existing int-based setters and improve Kotlin property support. - Add default short setters setCol1(short) and setCol2(short) that delegate to the existing int-based setters. - Add TestClientAnchorShortSetter to verify both the new short-based setters and the existing int-based setters. Tests: - ./gradlew :poi:test --tests 'org.apache.poi.ss.usermodel.TestClientAnchorShortSetter'
Member
|
next release is 6.0.0 - could you replace the TBD? |
pjfanning
reviewed
Feb 13, 2026
poi/src/test/java/org/apache/poi/ss/usermodel/TestClientAnchorShortSetter.java
Show resolved
Hide resolved
…horShortSetterntAnchorShortSetter.java Added license header to TestClientAnchorShortSetter.java
Contributor
Author
|
Thanks for the review. Added the standard ASF license header to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses Bug 69935,
where
ClientAnchorexposesshort-returning getters for the column indices (getCol1(),getCol2()) but onlyint-based setters (setCol1(int),setCol2(int)).This mismatch makes it difficult to use Kotlin property syntax, which expects matching getter/setter types for a property.
What is changed
Add default short-based setters on
ClientAnchor:default void setCol1(short col1)delegating tosetCol1(int).default void setCol2(short col2)delegating tosetCol2(int).This keeps the existing
int-based setters intact and binary compatible, while exposing ashort-typed getter/setter pair that works better with Kotlin properties.Add
TestClientAnchorShortSetterto cover:Notes
@sincetag on the new methods is left asTBDand can be adjusted by the committer to the appropriate release version.Testing
Locally ran:
./gradlew :poi:test --tests 'org.apache.poi.ss.usermodel.TestClientAnchorShortSetter'