Fix formatting errors
See gh-28212
This commit is contained in:
@@ -121,19 +121,19 @@ public class ReflectionHintsSerializerTests {
|
|||||||
void queriedMethods() throws JSONException {
|
void queriedMethods() throws JSONException {
|
||||||
ReflectionHints hints = new ReflectionHints();
|
ReflectionHints hints = new ReflectionHints();
|
||||||
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
||||||
(b) -> b.withMode(ExecutableMode.INTROSPECT)));
|
b -> b.withMode(ExecutableMode.INTROSPECT)));
|
||||||
|
|
||||||
assertEquals("""
|
assertEquals("""
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "java.lang.Integer",
|
"name": "java.lang.Integer",
|
||||||
"queriedMethods": [
|
"queriedMethods": [
|
||||||
{
|
{
|
||||||
"name": "parseInt",
|
"name": "parseInt",
|
||||||
"parameterTypes": ["java.lang.String"]
|
"parameterTypes": ["java.lang.String"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
""", hints);
|
""", hints);
|
||||||
}
|
}
|
||||||
@@ -142,19 +142,19 @@ public class ReflectionHintsSerializerTests {
|
|||||||
void methods() throws JSONException {
|
void methods() throws JSONException {
|
||||||
ReflectionHints hints = new ReflectionHints();
|
ReflectionHints hints = new ReflectionHints();
|
||||||
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
||||||
(b) -> b.withMode(ExecutableMode.INVOKE)));
|
b -> b.withMode(ExecutableMode.INVOKE)));
|
||||||
|
|
||||||
assertEquals("""
|
assertEquals("""
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "java.lang.Integer",
|
"name": "java.lang.Integer",
|
||||||
"methods": [
|
"methods": [
|
||||||
{
|
{
|
||||||
"name": "parseInt",
|
"name": "parseInt",
|
||||||
"parameterTypes": ["java.lang.String"]
|
"parameterTypes": ["java.lang.String"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
""", hints);
|
""", hints);
|
||||||
}
|
}
|
||||||
@@ -162,27 +162,27 @@ public class ReflectionHintsSerializerTests {
|
|||||||
void methodAndQueriedMethods() throws JSONException {
|
void methodAndQueriedMethods() throws JSONException {
|
||||||
ReflectionHints hints = new ReflectionHints();
|
ReflectionHints hints = new ReflectionHints();
|
||||||
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
||||||
(b) -> b.withMode(ExecutableMode.INVOKE)));
|
b -> b.withMode(ExecutableMode.INVOKE)));
|
||||||
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
hints.registerType(Integer.class, builder -> builder.withMethod("parseInt", List.of(TypeReference.of(String.class)),
|
||||||
(b) -> b.withMode(ExecutableMode.INTROSPECT)));
|
b -> b.withMode(ExecutableMode.INTROSPECT)));
|
||||||
|
|
||||||
assertEquals("""
|
assertEquals("""
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "java.lang.Integer",
|
"name": "java.lang.Integer",
|
||||||
"queriedMethods": [
|
"queriedMethods": [
|
||||||
{
|
{
|
||||||
"name": "parseInt",
|
"name": "parseInt",
|
||||||
"parameterTypes": ["java.lang.String"]
|
"parameterTypes": ["java.lang.String"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"methods": [
|
"methods": [
|
||||||
{
|
{
|
||||||
"name": "parseInt",
|
"name": "parseInt",
|
||||||
"parameterTypes": ["java.lang.String"]
|
"parameterTypes": ["java.lang.String"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
""", hints);
|
""", hints);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user