Did Kotlin with JDK 11 change resource loading?

Some of my test code failed after migrating from JDK 8 to JDK 11

val iStream1 = javaClass.getResourceAsStream("/app.properties")
logger.info("iStream1 = {}" , iStream1)
val iStream2 = {}::class.java.getResourceAsStream("/app.properties")
logger.info("iStream2 = {}" , iStream2)

The result is :

 iStream1 = null
 iStream2 = java.io.BufferedInputStream@31304f14

I was using iSteam1 style ( javaClass.getResourceAsStream ) and it worked well in JDK8 , but after migrating to JDK11 it became null . I have to change to {}::class.java.getResourceAsStream and it works now.

Does it mean {}::class.java.getResourceAsStream is a must for kotlin with JDK11 ?

Are there any tricky points here ?

It’s not by Kotlin, it’s the changes in JDK classloader mechanics.