Skip to content

Commit 2af6f14

Browse files
committed
cleanup
1 parent 5d45085 commit 2af6f14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core-api/src/main/java/com/optimizely/ab/optimizelyjson/OptimizelyJSON.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public OptimizelyJSON(@Nonnull Map<String,Object> map, ConfigParser parser) {
6060
/**
6161
* Returns the string representation of json data
6262
*/
63+
@Nonnull
6364
public String toString() {
6465
if (payload == null && map != null) {
6566
try {
@@ -75,6 +76,7 @@ public String toString() {
7576
/**
7677
* Returns the {@code Map<String,Object>} representation of json data
7778
*/
79+
@Nullable
7880
public Map<String,Object> toMap() {
7981
if (map == null && payload != null) {
8082
try {
@@ -102,6 +104,7 @@ public Map<String,Object> toMap() {
102104
* @param clazz The user-defined class that the json data will be parsed to
103105
* @return an instance of clazz type with the parsed data filled in (or null if parse fails)
104106
*/
107+
@Nullable
105108
public <T> T getValue(@Nullable String jsonKey, Class<T> clazz) throws UnsupportedOperationException {
106109
if (!(parser instanceof GsonConfigParser || parser instanceof JacksonConfigParser)) {
107110
throw new UnsupportedOperationException("A proper JSON parser is not available. Use Gson or Jackson parser for this operation.");

0 commit comments

Comments
 (0)