@@ -191,14 +191,12 @@ You can then point your browser to `http://localhost:8080/fruits.html` and use y
191
191
The library we use to serialize Java objects to JSON documents is http://json-b.net/[JSON-B].
192
192
It uses Java reflection to get the properties of an object and serialize them.
193
193
194
- Most likely, you have understood already that using native images requires you to register the usage of reflection.
194
+ Using native images with GraalVM, all classes that will be used with reflection need to be registered.
195
+ The good news is that Quarkus does that work for you most of the time.
196
+ So far, we haven't registered any class, not even `Fruit`, for reflection usage and everything is working fine.
195
197
196
- So far, we haven't registered any class, even not `Fruit`, for reflection usage.
197
- However everything is working fine.
198
-
199
- The fact is that Quarkus performs some magic when it is capable of inferring the serialized types from the REST methods.
200
-
201
- When you have the following REST method, it is fairly easy to determine that `Fruit` will be serialized:
198
+ Quarkus performs some magic when it is capable of inferring the serialized types from the REST methods.
199
+ When you have the following REST method, Quarkus determines that `Fruit` will be serialized:
202
200
203
201
[source,JAVA]
204
202
----
@@ -229,8 +227,7 @@ public Response list() {
229
227
}
230
228
----
231
229
232
- As you can imagine, it is not possible for Quarkus to determine at build time the type included in the `Response` as the information is not available.
233
-
230
+ It is not possible for Quarkus to determine at build time the type included in the `Response` as the information is not available.
234
231
In this case, Quarkus won't be able to automatically register for reflection the required classes.
235
232
236
233
This leads us to our next section.
0 commit comments