Я хочу проверить, имеет ли ячейка значение null или пусто, я использую устаревший код (оба getCellType() и CELL_TYPE_BLANK устарели):
Код: Выделить всё
if( (c == null) || c.getCellType() == c.CELL_TYPE_BLANK){
//do something
}
Альтернатива устаревшему getCellType
и я думал, что решение может выглядеть так:
Код: Выделить всё
if( (c == null) || c.getCellTypeEnum() == CellType.BLANK){
//Error: incomparable types: org.apache.poi.ss.usermodel.CellType and int
//do something
}
Код: Выделить всё
if( (c == null) || c.getBooleanCellValue()){
//do something
}
Подробнее здесь: https://stackoverflow.com/questions/477 ... ype-method