Merge pull request #664 from ferstl/issue-613

Add a JSR-305 @ThreadSafe annotation to the Gson class
This commit is contained in:
Jesse Wilson 2015-07-13 13:47:37 -04:00
commit bb34247cc4
2 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,12 @@
<url>http://www.google.com</url>
</organization>
<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -31,6 +31,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.concurrent.ThreadSafe;
import com.google.gson.internal.ConstructorConstructor;
import com.google.gson.internal.Excluder;
import com.google.gson.internal.Primitives;
@ -96,6 +98,7 @@ import com.google.gson.stream.MalformedJsonException;
* @author Joel Leitch
* @author Jesse Wilson
*/
@ThreadSafe
public final class Gson {
static final boolean DEFAULT_JSON_NON_EXECUTABLE = false;