poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r639918 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
Date Fri, 21 Mar 2008 23:47:52 GMT
Author: josh
Date: Fri Mar 21 16:47:51 2008
New Revision: 639918

URL: http://svn.apache.org/viewvc?rev=639918&view=rev
Log:
sort to int conversion sign extension fix

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java?rev=639918&r1=639917&r2=639918&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java Fri Mar 21 16:47:51 2008
@@ -296,9 +296,9 @@
      * @param cellnum  0 based column number
      * @return HSSFCell representing that column or null if undefined.
      */
-    public HSSFCell getCell(short cellnum)
-    {
-   		return getCell((int)cellnum);
+    public HSSFCell getCell(short cellnum) {
+        int ushortCellNum = cellnum & 0x0000FFFF; // avoid sign extension
+        return getCell(ushortCellNum);
     }
     /**
      * Get the hssfcell representing a given column (logical cell)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message