Skip to content

Commit

Permalink
Expose widely used Base(Map)Test util methods as public static (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JooHyukKim authored Oct 1, 2023
1 parent 1aef6cc commit 09166a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/test/java/com/fasterxml/jackson/databind/BaseMapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,15 @@ protected ObjectReader objectReader(Class<?> cls) {
return sharedMapper().readerFor(cls);
}

// `public` since 2.16, was only `protected` before then.
// @since 2.10
protected static ObjectMapper newJsonMapper() {
public static ObjectMapper newJsonMapper() {
return new JsonMapper();
}

// `public` since 2.16, was only `protected` before then.
// @since 2.10
protected static JsonMapper.Builder jsonMapperBuilder() {
public static JsonMapper.Builder jsonMapperBuilder() {
return JsonMapper.builder();
}

Expand Down
6 changes: 4 additions & 2 deletions src/test/java/com/fasterxml/jackson/databind/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ protected byte[] encodeInUTF32BE(String input)
return result;
}

public String q(String str) {
// `static` since 2.16, was only `public` before then.
public static String q(String str) {
return '"'+str+'"';
}

Expand All @@ -446,7 +447,8 @@ public String quote(String str) {
return q(str);
}

protected static String a2q(String json) {
// `public` since 2.16, was only `protected` before then.
public static String a2q(String json) {
return json.replace("'", "\"");
}

Expand Down

0 comments on commit 09166a0

Please sign in to comment.