{} where allowed
This commit is contained in:
@@ -37,6 +37,4 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
@Documented
|
||||
public @interface Alpha
|
||||
{
|
||||
}
|
||||
public @interface Alpha {}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
package net.runelite.client.config;
|
||||
|
||||
public class Button
|
||||
{
|
||||
}
|
||||
public class Button {}
|
||||
|
||||
@@ -24,6 +24,4 @@
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
public interface Config
|
||||
{
|
||||
}
|
||||
public interface Config {}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
package net.runelite.client.config;
|
||||
|
||||
public class Title
|
||||
{
|
||||
}
|
||||
public class Title {}
|
||||
|
||||
@@ -35,7 +35,4 @@ import net.runelite.api.events.Event;
|
||||
* it has nothing to do with whether an account is being logged out.
|
||||
*/
|
||||
@Data
|
||||
public class SessionClose implements Event
|
||||
{
|
||||
|
||||
}
|
||||
public class SessionClose implements Event {}
|
||||
|
||||
@@ -35,7 +35,4 @@ import net.runelite.api.events.Event;
|
||||
* it has nothing to do with whether an account is being logged in.
|
||||
*/
|
||||
@Data
|
||||
public class SessionOpen implements Event
|
||||
{
|
||||
|
||||
}
|
||||
public class SessionOpen implements Event {}
|
||||
|
||||
@@ -24,6 +24,4 @@
|
||||
*/
|
||||
package net.runelite.client.input;
|
||||
|
||||
public interface KeyListener extends java.awt.event.KeyListener
|
||||
{
|
||||
}
|
||||
public interface KeyListener extends java.awt.event.KeyListener {}
|
||||
|
||||
@@ -24,6 +24,4 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.achievementdiary;
|
||||
|
||||
public interface Requirement
|
||||
{
|
||||
}
|
||||
public interface Requirement {}
|
||||
|
||||
@@ -108,9 +108,7 @@ public class GrandExchangePlugin extends Plugin
|
||||
private static final OSBGrandExchangeClient CLIENT = new OSBGrandExchangeClient();
|
||||
private static final String OSB_GE_TEXT = "<br>OSBuddy Actively traded price: ";
|
||||
private static final String BUY_LIMIT_GE_TEXT = "<br>Buy limit: ";
|
||||
private static final TypeToken<Map<Integer, Integer>> BUY_LIMIT_TOKEN = new TypeToken<Map<Integer, Integer>>()
|
||||
{
|
||||
};
|
||||
private static final TypeToken<Map<Integer, Integer>> BUY_LIMIT_TOKEN = new TypeToken<Map<Integer, Integer>>() {};
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private NavigationButton button;
|
||||
|
||||
|
||||
@@ -140,9 +140,7 @@ public class GroundMarkerPlugin extends Plugin
|
||||
return GSON.fromJson(json, new GroundMarkerListTypeToken().getType());
|
||||
}
|
||||
|
||||
private static class GroundMarkerListTypeToken extends TypeToken<List<GroundMarkerPoint>>
|
||||
{
|
||||
}
|
||||
private static class GroundMarkerListTypeToken extends TypeToken<List<GroundMarkerPoint>> {}
|
||||
|
||||
private GroundMarkerConfig.amount amount;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
|
||||
@@ -301,10 +301,7 @@ public class InventorySetupPlugin extends Plugin
|
||||
{
|
||||
// TODO add last resort?, serialize exception just make empty map
|
||||
final Gson gson = new Gson();
|
||||
Type type = new TypeToken<HashMap<String, InventorySetup>>()
|
||||
{
|
||||
|
||||
}.getType();
|
||||
Type type = new TypeToken<HashMap<String, InventorySetup>>() {}.getType();
|
||||
inventorySetups.clear();
|
||||
inventorySetups.putAll(gson.fromJson(json, type));
|
||||
}
|
||||
@@ -371,7 +368,7 @@ public class InventorySetupPlugin extends Plugin
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final String setupName = panel.getSelectedInventorySetup();
|
||||
if (!setupName.isEmpty())
|
||||
{
|
||||
|
||||
@@ -1451,9 +1451,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
try
|
||||
{
|
||||
Collection<LootRecord> lootRecords = new ArrayList<>(RuneLiteAPI.GSON.fromJson(new FileReader(LOOT_RECORDS_FILE),
|
||||
new TypeToken<ArrayList<LootRecord>>()
|
||||
{
|
||||
}.getType()));
|
||||
new TypeToken<ArrayList<LootRecord>>() {}.getType()));
|
||||
|
||||
DSLContext dslContext = databaseManager.getDsl();
|
||||
|
||||
|
||||
@@ -26,6 +26,4 @@ package net.runelite.client.plugins.loottracker.localstorage.events;
|
||||
|
||||
import net.runelite.api.events.Event;
|
||||
|
||||
public class LTNameChange implements Event
|
||||
{
|
||||
}
|
||||
public class LTNameChange implements Event {}
|
||||
@@ -17,9 +17,7 @@ public class GrimyHerbLookup
|
||||
{
|
||||
final InputStream herbFile = GrimyHerbLookup.class.getResourceAsStream("/herbs.json");
|
||||
Gson gson = new Gson();
|
||||
mapping = gson.fromJson(new InputStreamReader(herbFile), new TypeToken<Map<String, HerbInfo>>()
|
||||
{
|
||||
}.getType());
|
||||
mapping = gson.fromJson(new InputStreamReader(herbFile), new TypeToken<Map<String, HerbInfo>>() {}.getType());
|
||||
}
|
||||
|
||||
public int getCleanLevel(int itemId)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
package net.runelite.client.plugins.menuentryswapper.util;
|
||||
|
||||
public class HerbNotFoundException extends RuntimeException
|
||||
{
|
||||
}
|
||||
public class HerbNotFoundException extends RuntimeException {}
|
||||
|
||||
@@ -62,9 +62,7 @@ public class NotesManager
|
||||
if (!Strings.isNullOrEmpty(configJson))
|
||||
{
|
||||
final Gson gson = new Gson();
|
||||
notes = gson.fromJson(configJson, new TypeToken<ArrayList<String>>()
|
||||
{
|
||||
}.getType());
|
||||
notes = gson.fromJson(configJson, new TypeToken<ArrayList<String>>() {}.getType());
|
||||
}
|
||||
|
||||
if (notes == null)
|
||||
|
||||
@@ -503,9 +503,7 @@ public class ObjectIndicatorsPlugin extends Plugin implements KeyListener
|
||||
return null;
|
||||
}
|
||||
|
||||
Set<ObjectPoint> points = GSON.fromJson(json, new TypeToken<Set<ObjectPoint>>()
|
||||
{
|
||||
}.getType());
|
||||
Set<ObjectPoint> points = GSON.fromJson(json, new TypeToken<Set<ObjectPoint>>() {}.getType());
|
||||
// Prior to multiloc support the plugin would mark objects named "null", which breaks
|
||||
// in most cases due to the specific object being identified being ambiguous, so remove
|
||||
// them
|
||||
|
||||
@@ -258,9 +258,7 @@ public class ScreenMarkerPlugin extends Plugin
|
||||
}
|
||||
|
||||
final Gson gson = new Gson();
|
||||
final List<ScreenMarker> screenMarkerData = gson.fromJson(json, new TypeToken<ArrayList<ScreenMarker>>()
|
||||
{
|
||||
}.getType());
|
||||
final List<ScreenMarker> screenMarkerData = gson.fromJson(json, new TypeToken<ArrayList<ScreenMarker>>() {}.getType());
|
||||
|
||||
return screenMarkerData.stream().map(ScreenMarkerOverlay::new);
|
||||
}
|
||||
|
||||
@@ -44,9 +44,7 @@ class SlayerXpDropLookup
|
||||
try (final InputStream xpFile = getClass().getResourceAsStream("/slayer_xp.json"))
|
||||
{
|
||||
Gson gson = new Gson();
|
||||
xpMap = gson.fromJson(new InputStreamReader(xpFile), new TypeToken<Map<String, List<Double>>>()
|
||||
{
|
||||
}.getType());
|
||||
xpMap = gson.fromJson(new InputStreamReader(xpFile), new TypeToken<Map<String, List<Double>>>() {}.getType());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -486,9 +486,7 @@ public class SpellbookPlugin extends Plugin
|
||||
}
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
final Collection<Spell> gson = GSON.fromJson(cfg, new TypeToken<List<Spell>>()
|
||||
{
|
||||
}
|
||||
final Collection<Spell> gson = GSON.fromJson(cfg, new TypeToken<List<Spell>>() {}
|
||||
.getType());
|
||||
// CHECKSTYLE:ON
|
||||
|
||||
|
||||
@@ -153,9 +153,7 @@ public class ClockManager
|
||||
if (!Strings.isNullOrEmpty(timersJson))
|
||||
{
|
||||
final Gson gson = new Gson();
|
||||
final List<Timer> timers = gson.fromJson(timersJson, new TypeToken<ArrayList<Timer>>()
|
||||
{
|
||||
}.getType());
|
||||
final List<Timer> timers = gson.fromJson(timersJson, new TypeToken<ArrayList<Timer>>() {}.getType());
|
||||
|
||||
this.timers.clear();
|
||||
this.timers.addAll(timers);
|
||||
@@ -170,9 +168,7 @@ public class ClockManager
|
||||
if (!Strings.isNullOrEmpty(stopwatchesJson))
|
||||
{
|
||||
final Gson gson = new Gson();
|
||||
final List<Stopwatch> stopwatches = gson.fromJson(stopwatchesJson, new TypeToken<ArrayList<Stopwatch>>()
|
||||
{
|
||||
}.getType());
|
||||
final List<Stopwatch> stopwatches = gson.fromJson(stopwatchesJson, new TypeToken<ArrayList<Stopwatch>>() {}.getType());
|
||||
|
||||
this.stopwatches.clear();
|
||||
this.stopwatches.addAll(stopwatches);
|
||||
|
||||
@@ -136,9 +136,7 @@ public class WikiSearchChatboxTextInput extends ChatboxTextInput
|
||||
try
|
||||
{
|
||||
JsonArray jar = new JsonParser().parse(body).getAsJsonArray();
|
||||
List<String> apredictions = gson.fromJson(jar.get(1), new TypeToken<List<String>>()
|
||||
{
|
||||
}.getType());
|
||||
List<String> apredictions = gson.fromJson(jar.get(1), new TypeToken<List<String>>() {}.getType());
|
||||
|
||||
if (apredictions.size() > MAX_NUM_PREDICTIONS)
|
||||
{
|
||||
|
||||
@@ -31,8 +31,6 @@ public class HiscorePanelTest
|
||||
@Test
|
||||
public void testConstructor()
|
||||
{
|
||||
new HiscorePanel(new HiscorePlugin()
|
||||
{
|
||||
});
|
||||
new HiscorePanel(new HiscorePlugin() {});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user