package com.ecwid.consul.json;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * @author Vasily Vasilkov (vgv@ecwid.com)
 */
public class GsonFactory {

	private static final GsonBuilder GSON_BUILDER = new GsonBuilder();

	private static final ThreadLocal<Gson> GSON = new ThreadLocal<Gson>() {
		@Override
		protected Gson initialValue() {
			return GSON_BUILDER.create();
		}
	};

	public static Gson getGson() {
		return GSON.get();
	}

}

@@ -200,209 +200,26 @@
 Gson
-Builder GSON_BUILDER = new GsonBuilder();%0A%0A%09private static final ThreadLocal%3CGson%3E GSON = new ThreadLocal%3CGson%3E() %7B%0A%09%09@Override%0A%09%09protected Gson initialValue() %7B%0A%09%09%09return GSON_BUILDER.create();%0A%09%09%7D%0A%09%7D
+ GSON = new Gson()
 ;%0A%0A%09
@@ -266,14 +266,8 @@
 GSON
-.get()
 ;%0A%09%7D

Fix #152