Skip to content

Commit 4fd3a11

Browse files
committed
Use one Gson instance in Keyboard
1 parent 82128fb commit 4fd3a11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/pengrad/telegrambot/model/request/Keyboard.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
*/
99
public abstract class Keyboard {
1010

11+
private Gson gson = new Gson();
12+
1113
@Override
1214
public final String toString() {
13-
return new Gson().toJson(this);
15+
return gson.toJson(this);
1416
}
1517

1618
}

0 commit comments

Comments
 (0)