Skip to content

Commit 524e246

Browse files
committed
Increase coverage for Send methods
1 parent dfafe2f commit 524e246

File tree

14 files changed

+87
-47
lines changed

14 files changed

+87
-47
lines changed

library/src/main/java/com/pengrad/telegrambot/model/Animation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public PhotoSize thumbnail() {
4848
*/
4949
@Deprecated
5050
public PhotoSize thumb() {
51-
return thumbnail;
51+
return thumbnail();
5252
}
5353

5454
public String fileName() {

library/src/main/java/com/pengrad/telegrambot/model/Audio.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public PhotoSize thumbnail() {
6262
*/
6363
@Deprecated
6464
public PhotoSize thumb() {
65-
return thumbnail;
65+
return thumbnail();
6666
}
6767

6868
@Override

library/src/main/java/com/pengrad/telegrambot/model/Document.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public PhotoSize thumbnail() {
3434
*/
3535
@Deprecated
3636
public PhotoSize thumb() {
37-
return thumbnail;
37+
return thumbnail();
3838
}
3939

4040
public String fileName() {

library/src/main/java/com/pengrad/telegrambot/model/Sticker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public PhotoSize thumbnail() {
7575
*/
7676
@Deprecated
7777
public PhotoSize thumb() {
78-
return thumbnail;
78+
return thumbnail();
7979
}
8080

8181
public String emoji() {

library/src/main/java/com/pengrad/telegrambot/model/StickerSet.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class StickerSet implements Serializable {
2121
private Boolean contains_masks;
2222
private Sticker[] stickers;
2323
private PhotoSize thumbnail;
24-
24+
2525

2626
public String name() {
2727
return name;
@@ -39,9 +39,9 @@ public Boolean isAnimated() {
3939
return is_animated;
4040
}
4141

42-
/**
43-
* @deprecated Use type() and check if it equals to Type.mask
44-
*/
42+
/**
43+
* @deprecated Use type() and check if it equals to Type.mask
44+
*/
4545
@Deprecated
4646
public Boolean containsMasks() {
4747
return contains_masks;
@@ -58,9 +58,9 @@ public PhotoSize thumbnail() {
5858
/**
5959
* @deprecated Use thumbnail instead
6060
*/
61-
@Deprecated
61+
@Deprecated
6262
public PhotoSize thumb() {
63-
return thumbnail;
63+
return thumbnail();
6464
}
6565

6666
public Boolean isVideo() {

library/src/main/java/com/pengrad/telegrambot/model/Video.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public PhotoSize thumbnail() {
5050
*/
5151
@Deprecated
5252
public PhotoSize thumb() {
53-
return thumbnail;
53+
return thumbnail();
5454
}
5555

5656
public String fileName() {

library/src/main/java/com/pengrad/telegrambot/model/VideoNote.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public PhotoSize thumbnail() {
4242
*/
4343
@Deprecated
4444
public PhotoSize thumb() {
45-
return thumbnail;
45+
return thumbnail();
4646
}
4747

4848
public Long fileSize() {

library/src/main/java/com/pengrad/telegrambot/request/SendAnimation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public SendAnimation height(int height) {
4040
*/
4141
@Deprecated
4242
public SendAnimation thumb(byte[] thumb) {
43-
return super.thumbnail(thumb);
43+
return thumbnail(thumb);
4444
}
4545

4646
/**
4747
* @deprecated Use thumbnail instead
4848
*/
4949
@Deprecated
5050
public SendAnimation thumb(File thumb) {
51-
return super.thumbnail(thumb);
51+
return thumbnail(thumb);
5252
}
5353

5454
public SendAnimation thumbnail(byte[] thumbnail) {

library/src/main/java/com/pengrad/telegrambot/request/SendAudio.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ public SendAudio title(String title) {
5252
*/
5353
@Deprecated
5454
public SendAudio thumb(byte[] thumb) {
55-
return super.thumbnail(thumb);
55+
return thumbnail(thumb);
5656
}
5757

5858
/**
5959
* @deprecated Use thumbnail instead
6060
*/
6161
@Deprecated
6262
public SendAudio thumb(File thumb) {
63-
return super.thumbnail(thumb);
63+
return thumbnail(thumb);
6464
}
6565

6666
public SendAudio thumbnail(byte[] thumbnail) {

library/src/main/java/com/pengrad/telegrambot/request/SendDocument.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public SendDocument(Object chatId, byte[] document) {
2828
*/
2929
@Deprecated
3030
public SendDocument thumb(byte[] thumb) {
31-
return super.thumbnail(thumb);
31+
return thumbnail(thumb);
3232
}
3333

3434
/**
3535
* @deprecated Use thumbnail instead
3636
*/
3737
@Deprecated
3838
public SendDocument thumb(File thumb) {
39-
return super.thumbnail(thumb);
39+
return thumbnail(thumb);
4040
}
4141

4242
public SendDocument thumbnail(byte[] thumbnail) {

library/src/main/java/com/pengrad/telegrambot/request/SendVideo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ public SendVideo height(int height) {
3838
/**
3939
* @deprecated Use thumbnail instead
4040
*/
41-
@Deprecated
41+
@Deprecated
4242
public SendVideo thumb(byte[] thumb) {
43-
return super.thumbnail(thumb);
43+
return thumbnail(thumb);
4444
}
4545

4646
/**
4747
* @deprecated Use thumbnail instead
4848
*/
49-
@Deprecated
49+
@Deprecated
5050
public SendVideo thumb(File thumb) {
51-
return super.thumbnail(thumb);
51+
return thumbnail(thumb);
5252
}
5353

5454
public SendVideo thumbnail(byte[] thumbnail) {

library/src/main/java/com/pengrad/telegrambot/request/SendVideoNote.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public SendVideoNote length(int length) {
3333
*/
3434
@Deprecated
3535
public SendVideoNote thumb(byte[] thumb) {
36-
return super.thumbnail(thumb);
36+
return thumbnail(thumb);
3737
}
3838

3939
/**
4040
* @deprecated Use thumbnail instead
4141
*/
4242
@Deprecated
4343
public SendVideoNote thumb(File thumb) {
44-
return super.thumbnail(thumb);
44+
return thumbnail(thumb);
4545
}
4646

4747
public SendVideoNote thumbnail(byte[] thumbnail) {

0 commit comments

Comments
 (0)