poi部分方法过时

poi获取单元格类型方法getCellTypeEnum()在3.15版本中过时,但是官网文档是基于3.8版本,还是用的此方法,怎么能找到替代方法?

clipboard.png

阅读 24.6k
2 个回答
 /**
     * Return the cell type.
     * 
     * Will return {@link CellType} in version 4.0 of POI.
     * For forwards compatibility, do not hard-code cell type literals in your code.
     *
     * @return the cell type
     * @deprecated POI 3.15. Will return a {@link CellType} enum in the future.
     */
    int getCellType();
    
    

注释说未来会提供,没提供代替方法标过时,这种做法是有点奇葩

名字改成了:getCellType

官方文档:https://poi.apache.org/apidoc...

文档说:返回 int 的在 4.0 版本后将要替换成返回 CellType,但是名字还是 getCellType

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题