More deprecation removal

This commit is contained in:
Matthew Miller
2018-06-16 16:36:55 +10:00
parent 20bf6e079b
commit aaaf2d5678
152 changed files with 701 additions and 1150 deletions

View File

@ -72,7 +72,7 @@ public final class CompoundTag extends Tag {
* @return the builder
*/
public CompoundTagBuilder createBuilder() {
return new CompoundTagBuilder(new HashMap<String, Tag>(value));
return new CompoundTagBuilder(new HashMap<>(value));
}
/**

View File

@ -35,7 +35,7 @@ public class CompoundTagBuilder {
* Create a new instance.
*/
CompoundTagBuilder() {
this.entries = new HashMap<String, Tag>();
this.entries = new HashMap<>();
}
/**
@ -189,7 +189,7 @@ public class CompoundTagBuilder {
* @return the new compound tag
*/
public CompoundTag build() {
return new CompoundTag(new HashMap<String, Tag>(entries));
return new CompoundTag(new HashMap<>(entries));
}
/**

View File

@ -42,7 +42,7 @@ public class ListTagBuilder {
ListTagBuilder(Class<? extends Tag> type) {
checkNotNull(type);
this.type = type;
this.entries = new ArrayList<Tag>();
this.entries = new ArrayList<>();
}
/**
@ -80,7 +80,7 @@ public class ListTagBuilder {
* @return the new list tag
*/
public ListTag build() {
return new ListTag(type, new ArrayList<Tag>(entries));
return new ListTag(type, new ArrayList<>(entries));
}
/**

View File

@ -128,7 +128,7 @@ public final class NBTInputStream implements Closeable {
int childType = is.readByte();
length = is.readInt();
List<Tag> tagList = new ArrayList<Tag>();
List<Tag> tagList = new ArrayList<>();
for (int i = 0; i < length; ++i) {
Tag tag = readTagPayload(childType, depth + 1);
if (tag instanceof EndTag) {
@ -139,7 +139,7 @@ public final class NBTInputStream implements Closeable {
return new ListTag(NBTUtils.getTypeClass(childType), tagList);
case NBTConstants.TYPE_COMPOUND:
Map<String, Tag> tagMap = new HashMap<String, Tag>();
Map<String, Tag> tagMap = new HashMap<>();
while (true) {
NamedTag namedTag = readNamedTag(depth + 1);
Tag tag = namedTag.getTag();