Skip to content

Commit

Permalink
Improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni0451 committed Jan 5, 2025
1 parent 862738d commit 02afee1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<property name="charset" value="UTF-8"/>
<property name="fileExtensions" value="java, json, xml, properties"/>
<property name="severity" value="warning"/> <!-- error -->
<!--<module name="SuppressionFilter">-->
<!-- <property name="file" value="${config_loc}/suppressions.xml"/>-->
<!--</module>-->
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>

<module name="NewlineAtEndOfFile"/>
<module name="FileTabCharacter"/>
Expand Down
2 changes: 1 addition & 1 deletion config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress files="TheClassToIgnore\.java" checks="[a-zA-Z0-9]*"/>
<suppress files="Tutorial\.java" checks="Regexp"/>
</suppressions>
3 changes: 2 additions & 1 deletion src/main/java/net/lenni0451/miniconnect/utils/ViaUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.lenni0451.mcstructs.nbt.INbtTag;

import javax.annotation.Nullable;
import java.util.Collections;
import java.util.Map;

public class ViaUtils {
Expand All @@ -21,7 +22,7 @@ public static Tag convertNbt(@Nullable final INbtTag nbt) {
case BYTE_ARRAY -> new ByteArrayTag(nbt.asByteArrayTag().getValue());
case STRING -> new StringTag(nbt.asStringTag().getValue());
case LIST -> {
ListTag<? super Tag> listTag = new ListTag<>();
ListTag<? super Tag> listTag = new ListTag<>(Collections.emptyList());
for (INbtTag tag : nbt.asListTag()) {
listTag.add(convertNbt(tag));
}
Expand Down

0 comments on commit 02afee1

Please sign in to comment.