Skip to content

Commit

Permalink
Remove unnecessary @nonnull annotations in Serializer
Browse files Browse the repository at this point in the history
The @nonnull annotations were redundant since the class is already marked with @NullMarked. This change simplifies the code and enhances readability without affecting functionality.
  • Loading branch information
NonSwag committed Oct 31, 2024
1 parent 3dabc68 commit 2cc2eb8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nbt/src/main/java/core/nbt/serialization/Serializer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.nbt.serialization;

import core.nbt.tag.Tag;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

Expand All @@ -21,7 +20,7 @@ class Serializer implements TagDeserializationContext, TagSerializationContext {

@Override
@SuppressWarnings("unchecked")
public @Nullable <T> T deserialize(@NonNull Tag tag, @NonNull Type type) throws ParserException {
public @Nullable <T> T deserialize(Tag tag, Type type) throws ParserException {
if (tag == Tag.EMPTY) return null;
var deserializer = deserializers.get(type);
if (deserializer != null) return (T) deserializer.deserialize(tag, this);
Expand Down

0 comments on commit 2cc2eb8

Please sign in to comment.