Skip to content

Commit 7515c28

Browse files
committed
Add exception documentation for add method in ListTag
1 parent e9fbbde commit 7515c28

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/glavo/nbt/tag/ListTag.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ public void setElementType(@Nullable TagType elementType) throws IllegalStateExc
111111
/// {@inheritDoc}
112112
///
113113
/// The name of the tag will be set to empty.
114+
///
115+
/// @throws IllegalArgumentException if the type of the tag is not the same as the element type of this list.
114116
@Override
115117
public void add(T tag) {
116118
if (tag.getType() != elementType) {

0 commit comments

Comments
 (0)