Commit 320b0a29 authored by Daniel Wolf's avatar Daniel Wolf

Avoid lazy

parent dfbcc689
......@@ -16,7 +16,7 @@ import java.io.Reader
*/
open class DnsMessageJsonConverter {
protected val gson:Gson by lazy { GsonBuilder().registerTypeAdapter(DnsMessage::class.java, DnsMessageTypeAdapter()).create() }
private val gson:Gson = GsonBuilder().registerTypeAdapter(DnsMessage::class.java, DnsMessageTypeAdapter()).create()
open fun convertFromJson(json:String):DnsMessage {
return gson.fromJson(json, DnsMessage::class.java)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment