https://bz.apache.org/bugzilla/show_bug.cgi?id=69935

            Bug ID: 69935
           Summary: ClientAnchor: Inconsistent types between
                    getCol1()/getCol2() returning short and
                    setCol1()/setCol2() accepting int
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The ClientAnchor interface has inconsistent return/parameter types for
column-related methods:                                                         

- getCol1() returns short                                                       
- setCol1(int col1) accepts int                                                 
- getCol2() returns short                                                       
- setCol2(int col2) accepts int                                                 

In contrast, row methods are consistent:                                        
- getRow1() returns int                                                         
- setRow1(int row1) accepts int                                                 

This is similar to Bug 46225, where HSSFSheet column methods were migrated from
short to int. 
It appears ClientAnchor.getCol1()/getCol2() were missed in that migration.

This inconsistency causes issues in Kotlin where property syntax requires
matching getter/setter types. 
Users are forced to use explicit setter method calls instead of property
assignment:

// Kotlin - This doesn't work:                                                  
anchor.col1 = 5  // Error: setter type mismatch                                 

// Must use:                                                                    
anchor.setCol1(5)                                                               

Suggestion: Change getCol1()/getCol2() to return int for consistency with row
methods, setters, and modern usage patterns.

Affected versions: All (verified in 5.2.5 and trunk)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to