Skip to content

Commit 09166a0

Browse files
authored
Expose widely used Base(Map)Test util methods as public static (#4133)
1 parent 1aef6cc commit 09166a0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/test/java/com/fasterxml/jackson/databind/BaseMapTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,15 @@ protected ObjectReader objectReader(Class<?> cls) {
238238
return sharedMapper().readerFor(cls);
239239
}
240240

241+
// `public` since 2.16, was only `protected` before then.
241242
// @since 2.10
242-
protected static ObjectMapper newJsonMapper() {
243+
public static ObjectMapper newJsonMapper() {
243244
return new JsonMapper();
244245
}
245246

247+
// `public` since 2.16, was only `protected` before then.
246248
// @since 2.10
247-
protected static JsonMapper.Builder jsonMapperBuilder() {
249+
public static JsonMapper.Builder jsonMapperBuilder() {
248250
return JsonMapper.builder();
249251
}
250252

src/test/java/com/fasterxml/jackson/databind/BaseTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ protected byte[] encodeInUTF32BE(String input)
437437
return result;
438438
}
439439

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

@@ -446,7 +447,8 @@ public String quote(String str) {
446447
return q(str);
447448
}
448449

449-
protected static String a2q(String json) {
450+
// `public` since 2.16, was only `protected` before then.
451+
public static String a2q(String json) {
450452
return json.replace("'", "\"");
451453
}
452454

0 commit comments

Comments
 (0)