Skip to content

Commit 406c51d

Browse files
Add more missing nullability annotations
1 parent f58966d commit 406c51d

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/main/java/net/dv8tion/jda/api/entities/SKU.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package net.dv8tion.jda.api.entities;
1818

19+
import javax.annotation.Nonnull;
1920
import java.util.Set;
2021

2122
/**
@@ -27,24 +28,28 @@ public interface SKU extends SkuSnowflake
2728
* Type of the SKU
2829
* @return SKU type
2930
*/
31+
@Nonnull
3032
SKUType getType();
3133

3234
/**
3335
* Customer-facing name of your premium offering
3436
* @return SKU name
3537
*/
38+
@Nonnull
3639
String getName();
3740

3841
/**
3942
* System-generated URL slug based on the SKU's name
4043
* @return SKU slug
4144
*/
45+
@Nonnull
4246
String getSlug();
4347

4448
/**
4549
* Flags can be used to differentiate user and server subscriptions
4650
* @return set of flags.
4751
*/
52+
@Nonnull
4853
Set<SKUFlag> getFlags();
4954

5055
/**

src/main/java/net/dv8tion/jda/api/entities/SKUType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package net.dv8tion.jda.api.entities;
1818

19+
import javax.annotation.Nonnull;
20+
1921
/**
2022
* SKU Types represent the type of the offered SKU.
2123
*
@@ -61,6 +63,7 @@ public enum SKUType
6163
*
6264
* @return SKU type or {@link #UNKNOWN} if the SKU is not known.
6365
*/
66+
@Nonnull
6467
public static SKUType fromId(int type)
6568
{
6669
for (SKUType value : values())

src/main/java/net/dv8tion/jda/internal/entities/SKUImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import net.dv8tion.jda.api.entities.SKUFlag;
2121
import net.dv8tion.jda.api.entities.SKUType;
2222

23+
import javax.annotation.Nonnull;
2324
import java.util.Set;
2425

2526
public class SKUImpl extends SkuSnowflakeImpl implements SKU
@@ -39,24 +40,28 @@ public SKUImpl(long id, SKUType type, String name, String slug, Set<SKUFlag> fla
3940
}
4041

4142
@Override
43+
@Nonnull
4244
public SKUType getType()
4345
{
4446
return type;
4547
}
4648

4749
@Override
50+
@Nonnull
4851
public String getName()
4952
{
5053
return name;
5154
}
5255

5356
@Override
57+
@Nonnull
5458
public String getSlug()
5559
{
5660
return slug;
5761
}
5862

5963
@Override
64+
@Nonnull
6065
public Set<SKUFlag> getFlags()
6166
{
6267
return flags;

0 commit comments

Comments
 (0)