File tree 1 file changed +3
-0
lines changed
extras/src/main/java/com/google/gson/graph 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package com .google .gson .graph ;
18
18
19
+ import com .google .errorprone .annotations .CanIgnoreReturnValue ;
19
20
import com .google .gson .Gson ;
20
21
import com .google .gson .GsonBuilder ;
21
22
import com .google .gson .InstanceCreator ;
@@ -85,6 +86,7 @@ public GraphAdapterBuilder() {
85
86
* @param type the type to register
86
87
* @return this builder instance for chaining
87
88
*/
89
+ @ CanIgnoreReturnValue
88
90
public GraphAdapterBuilder addType (Type type ) {
89
91
ObjectConstructor <?> objectConstructor = constructorConstructor .get (TypeToken .get (type ));
90
92
InstanceCreator <Object > instanceCreator =
@@ -105,6 +107,7 @@ public Object createInstance(Type type) {
105
107
* deserialization
106
108
* @return this builder instance for chaining
107
109
*/
110
+ @ CanIgnoreReturnValue
108
111
public GraphAdapterBuilder addType (Type type , InstanceCreator <?> instanceCreator ) {
109
112
if (type == null || instanceCreator == null ) {
110
113
throw new NullPointerException ();
You can’t perform that action at this time.
0 commit comments