Pull request #167: Ignore failing Ruling expansion

Merge in RED/redaction-service from IgnoreFailedRulingExpansion to master

* commit '418faac923e79c17f2d2b88a02920ab459fc36bf':
  Ignore failing Ruling expansion
This commit is contained in:
Dominique Eiflaender 2021-06-02 12:58:28 +02:00
commit 1f288d04ac

View File

@ -246,8 +246,12 @@ public class Ruling extends Line2D.Float {
public Ruling expand(float amount) {
Ruling r = (Ruling) this.clone();
r.setStart(this.getStart() - amount);
r.setEnd(this.getEnd() + amount);
try {
r.setStart(this.getStart() - amount);
r.setEnd(this.getEnd() + amount);
} catch (UnsupportedOperationException e){
log.warn("Could not expand ruling!");
}
return r;
}