RegionUtil has to change some methods to switch old int/short value to new enums classes (like BorderStyle, HorizontalAlignment, FillPatternType...) Actually, with version 3.15, we have some output lines like : BorderStyle short usage I use RegionUtil with merged zones, to put some border, with the following code : protected static void addMergedRegion(Sheet sheet, int iRowMin, int iRowMax, int iColMin, int iColMax) { CellRangeAddress cellZone = new CellRangeAddress(iRowMin, iRowMax, iColMin, iColMax); sheet.addMergedRegion(cellZone); Cell cell = sheet.getRow(iRowMin).getCell(iColMin); if (cell != null) { RegionUtil.setBorderBottom(cell.getCellStyle().getBorderBottomEnum().getCode(), cellZone, sheet); RegionUtil.setBorderTop(cell.getCellStyle().getBorderTopEnum().getCode(), cellZone, sheet); RegionUtil.setBorderLeft(cell.getCellStyle().getBorderLeftEnum().getCode(), cellZone, sheet); RegionUtil.setBorderRight(cell.getCellStyle().getBorderRightEnum().getCode(), cellZone, sheet); RegionUtil.setBottomBorderColor(cell.getCellStyle().getBottomBorderColor(), cellZone, sheet); RegionUtil.setTopBorderColor(cell.getCellStyle().getTopBorderColor(), cellZone, sheet); RegionUtil.setLeftBorderColor(cell.getCellStyle().getLeftBorderColor(), cellZone, sheet); RegionUtil.setRightBorderColor(cell.getCellStyle().getRightBorderColor(), cellZone, sheet); } } Maybe, there is a new way to do the same thing, but I don't find it. I have submitted a question here : http://stackoverflow.com/questions/39765675/
Added in r1762856. I believe only BorderStyle applies to setBorderLeft|Right|Top|Bottom. Fill pattern and text alignment in a cell is currently not handled by RegionUtil.setBorderLeft|Right|Top|Bottom. See bug 58787 for some potential future changes to work with multi-cell regions.
And r1762859 so that the new methods don't log a BorderStyle short usage warning in the POI logger.