From 418faac923e79c17f2d2b88a02920ab459fc36bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominique=20Eifl=C3=A4nder?= Date: Wed, 2 Jun 2021 12:53:30 +0200 Subject: [PATCH] Ignore failing Ruling expansion --- .../redaction/v1/server/tableextraction/model/Ruling.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Ruling.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Ruling.java index e90c52b2..ee64ceac 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Ruling.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Ruling.java @@ -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; }