pjfanning commented on code in PR #1042:
URL: https://github.com/apache/poi/pull/1042#discussion_r3046928308


##########
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBCellRange.java:
##########
@@ -26,17 +26,32 @@ Licensed to the Apache Software Foundation (ASF) under one 
or more
  * @since 3.16-beta3

Review Comment:
   Could you change this `@since 6.0.0`? Since it was not public, it made 
little sense to have a since version but making it public makes it important to 
document when it is available since.



##########
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java:
##########
@@ -63,9 +63,8 @@ public void handleRecord(int id, byte[] data) throws 
XSSFBParseException {
                 int offset = 0;
                 authorId = XSSFBUtils.castToInt(LittleEndian.getUInt(data)); 
offset += LittleEndianConsts.INT_SIZE;
                 cellRange = XSSFBCellRange.parse(data, offset, cellRange);
-                offset+= XSSFBCellRange.length;

Review Comment:
   removed because it is not used after this point?



##########
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBUtils.java:
##########
@@ -85,14 +85,14 @@ public static int readXLWideString(byte[] data, int offset, 
StringBuilder sb) th
         return numBytes;
     }
 
-    static int castToInt(long val) {
+    public static int castToInt(long val) {

Review Comment:
   Do we really need to make this public? JDK has better methods to safely 
convert long to int. Math.toIntExact  - for instance.
   Likewise castToShort.
   



##########
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBRichStr.java:
##########
@@ -23,7 +23,7 @@ Licensed to the Apache Software Foundation (ASF) under one or 
more
  * @since 3.16-beta3

Review Comment:
   Could you change this `@since 6.0.0`? Since it was not public, it made 
little sense to have a since version but making it public makes it important to 
document when it is available since.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to