From 3cb06fc67b522047fad9cb3df60ca61b69d7151d Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 18 Jun 2024 22:59:33 +0200 Subject: [PATCH] Added builder overload --- .../com/helger/schematron/svrl/SVRLResourceError.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ph-schematron-api/src/main/java/com/helger/schematron/svrl/SVRLResourceError.java b/ph-schematron-api/src/main/java/com/helger/schematron/svrl/SVRLResourceError.java index 3dd6b48f5..cae2b4f6c 100644 --- a/ph-schematron-api/src/main/java/com/helger/schematron/svrl/SVRLResourceError.java +++ b/ph-schematron-api/src/main/java/com/helger/schematron/svrl/SVRLResourceError.java @@ -23,6 +23,7 @@ import javax.annotation.Nullable; import com.helger.commons.ValueEnforcer; +import com.helger.commons.error.IError; import com.helger.commons.error.SingleError; import com.helger.commons.error.level.IErrorLevel; import com.helger.commons.error.text.IHasErrorText; @@ -123,6 +124,13 @@ public SVRLErrorBuilder (@Nonnull final String sTest) test (sTest); } + public SVRLErrorBuilder (@Nonnull final IError aError) + { + super (aError); + if (aError instanceof SVRLResourceError) + test (((SVRLResourceError) aError).getTest ()); + } + @Nonnull public final SVRLErrorBuilder test (@Nonnull final String sTest) {