Looks like there is a typo in the code. @Override public void removeBorder(BorderEdge edge) { ... case right: if (pr.isSetLnR()) { pr.unsetLnB(); } ... This is relevant for 3.17 and 4.0.0 versions.
https://svn.apache.org/repos/asf/poi/trunk@1843180