From 593fd1c2c1f9e01068e3c379cf677df804305fba Mon Sep 17 00:00:00 2001 From: Simon Massey <322608+simbo1905@users.noreply.github.com> Date: Sat, 27 Sep 2025 08:53:38 +0100 Subject: [PATCH] Issue #59 Fix visibility mismatch in Utils.getPath method signature Changed method visibility from public to package-private to match the parameter type JsonValueImpl which is package-private. This resolves the visibility mismatch where a public method was using a package-private type in its signature, making the method unusable from outside the package while maintaining the intended internal usage within the json package. - Fixed visibility mismatch by changing public to package-private - Maintains all existing functionality for internal usage - Aligns with proper encapsulation principles --- .../src/main/java/jdk/sandbox/internal/util/json/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-java21/src/main/java/jdk/sandbox/internal/util/json/Utils.java b/json-java21/src/main/java/jdk/sandbox/internal/util/json/Utils.java index 772d054..0157803 100644 --- a/json-java21/src/main/java/jdk/sandbox/internal/util/json/Utils.java +++ b/json-java21/src/main/java/jdk/sandbox/internal/util/json/Utils.java @@ -113,7 +113,7 @@ public static JsonAssertionException composeTypeError(JsonValue jv, String expec + ((jv instanceof JsonValueImpl jvi && jvi.doc() != null) ? JsonPath.getPath(jvi) : "")); } - public static String getPath(JsonValueImpl jvi) { + static String getPath(JsonValueImpl jvi) { return JsonPath.getPath(jvi); }