File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
extensions/kotlin/deployment/src/main/java/io/quarkus/kotlin/deployment
integration-tests/kotlin-serialization/src
main/kotlin/io/quarkus/it/kotser
test/kotlin/io/quarkus/it/kotser Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ void registerKotlinReflection(final BuildProducer<ReflectiveClassBuildItem> refl
6161 .build ());
6262 reflectiveClass .produce (ReflectiveClassBuildItem .builder ("kotlin.KotlinVersion$Companion[]" ).constructors (false )
6363 .build ());
64+ reflectiveClass .produce (
65+ ReflectiveClassBuildItem .builder ("kotlin.collections.EmptyList" , "kotlin.collections.EmptyMap" ).build ());
6466
6567 nativeResourcePatterns .produce (builder ().includePatterns (
6668 "META-INF/.*.kotlin_module$" ,
Original file line number Diff line number Diff line change @@ -73,5 +73,17 @@ class GreetingResource {
7373 return Response .ok().entity(javaMethod.invoke(this )).build()
7474 }
7575
76+ @GET
77+ @Path(" emptyList" )
78+ fun emptyList (): List <String > {
79+ return emptyList<String >()
80+ }
81+
82+ @GET
83+ @Path(" emptyMap" )
84+ fun emptyMap (): Map <String , String > {
85+ return emptyMap<String , String >()
86+ }
87+
7688 fun reflect () = " hello, world"
7789}
Original file line number Diff line number Diff line change @@ -124,4 +124,14 @@ open class ResourceTest {
124124 body(CoreMatchers .equalTo(" hello, world" ))
125125 }
126126 }
127+
128+ @Test
129+ fun testEmptyList () {
130+ When { get(" /emptyList" ) } Then { statusCode(200 ) }
131+ }
132+
133+ @Test
134+ fun testEmptyMap () {
135+ When { get(" /emptyList" ) } Then { statusCode(200 ) }
136+ }
127137}
You can’t perform that action at this time.
0 commit comments