From 45863162c2c7c10ee2df5407e2687fff25406bdf Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sun, 14 Jan 2024 20:32:28 +0100 Subject: [PATCH] format --- .../io/papermc/codebook/lvt/LvtTypeSuggester.java | 3 ++- .../lvt/suggestion/FluentGetterSuggester.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtTypeSuggester.java b/codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtTypeSuggester.java index 7f7f24d..405de98 100644 --- a/codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtTypeSuggester.java +++ b/codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtTypeSuggester.java @@ -104,7 +104,8 @@ private String suggestNameFromClassType(final ClassType type) throws IOException // TODO Try to determine name from signature, rather than just descriptor final @Nullable ClassData typeClass = this.context.getContextProvider().findClass(type); if (typeClass != null) { - if (typeClass.doesExtendOrImplement(this.listClass) && !typeClass.name().startsWith("net/minecraft/nbt/")) { // exclude nbt lists + if (typeClass.doesExtendOrImplement(this.listClass) + && !typeClass.name().startsWith("net/minecraft/nbt/")) { // exclude nbt lists return "list"; } else if (typeClass.doesExtendOrImplement(this.setClass)) { return "set"; diff --git a/codebook-lvt/src/main/java/io/papermc/codebook/lvt/suggestion/FluentGetterSuggester.java b/codebook-lvt/src/main/java/io/papermc/codebook/lvt/suggestion/FluentGetterSuggester.java index ab8e746..c7415e3 100644 --- a/codebook-lvt/src/main/java/io/papermc/codebook/lvt/suggestion/FluentGetterSuggester.java +++ b/codebook-lvt/src/main/java/io/papermc/codebook/lvt/suggestion/FluentGetterSuggester.java @@ -36,7 +36,16 @@ public class FluentGetterSuggester implements LvtSuggester { - private static final Set ignored = Set.of("byteValue", "shortValue", "intValue", "longValue", "floatValue", "doubleValue", "booleanValue", "charValue", "get"); + private static final Set ignored = Set.of( + "byteValue", + "shortValue", + "intValue", + "longValue", + "floatValue", + "doubleValue", + "booleanValue", + "charValue", + "get"); // 3 instructions, load "this" local var, getfield, return - TODO maybe if there is a CAST, private static final IntPredicate[] OPCODES_IN_ORDER = new IntPredicate[] {