From 6c035aa6e795b64fc4c778b20eb1b9bdd3bcf2bf Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Sun, 12 Jan 2025 16:27:01 -0800 Subject: [PATCH] Tiny test refactoring --- .../fasterxml/jackson/core/ErrorReportConfigurationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/fasterxml/jackson/core/ErrorReportConfigurationTest.java b/src/test/java/com/fasterxml/jackson/core/ErrorReportConfigurationTest.java index e6b24f91d5..6d1ba78608 100644 --- a/src/test/java/com/fasterxml/jackson/core/ErrorReportConfigurationTest.java +++ b/src/test/java/com/fasterxml/jackson/core/ErrorReportConfigurationTest.java @@ -133,7 +133,7 @@ void builderConstructorWithErrorReportConfiguration() .maxRawContentLength(5678) .build(); - ErrorReportConfiguration configB = new ErrorReportConfiguration.Builder(configA).build(); + ErrorReportConfiguration configB = configA.rebuild().build(); assertEquals(configA.getMaxErrorTokenLength(), configB.getMaxErrorTokenLength()); assertEquals(configA.getMaxRawContentLength(), configB.getMaxRawContentLength()); @@ -312,7 +312,7 @@ private void _testWithMaxErrorTokenLength(int expectedSize, int tokenLen, JsonFa parser.nextToken(); parser.nextToken(); } catch (JsonProcessingException e) { - assertThat(e.getLocation()._totalChars).isEqualTo(expectedSize); + assertThat(e.getLocation().getCharOffset()).isEqualTo(expectedSize); assertThat(e.getMessage()).contains("Unrecognized token"); } }