{} where allowed

This commit is contained in:
Lucwousin
2019-11-16 04:37:03 +01:00
parent 55b0845a18
commit b7bd7c5a08
68 changed files with 72 additions and 222 deletions

View File

@@ -24,7 +24,4 @@
*/
package net.runelite.cache.definitions;
public interface WorldMapTypeBase
{
}
public interface WorldMapTypeBase {}

View File

@@ -25,7 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface ArrayStoreInstruction extends MappableInstruction
{
}
public interface ArrayStoreInstruction extends MappableInstruction {}

View File

@@ -25,7 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface ComparisonInstruction
{
}
public interface ComparisonInstruction {}

View File

@@ -25,7 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface ConversionInstruction
{
}
public interface ConversionInstruction {}

View File

@@ -25,6 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface GetFieldInstruction extends FieldInstruction
{
}
public interface GetFieldInstruction extends FieldInstruction {}

View File

@@ -25,7 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface ReturnInstruction
{
}
public interface ReturnInstruction {}

View File

@@ -25,6 +25,4 @@
package net.runelite.asm.attributes.code.instruction.types;
public interface SetFieldInstruction extends FieldInstruction, MappableInstruction
{
}
public interface SetFieldInstruction extends FieldInstruction, MappableInstruction {}

View File

@@ -24,7 +24,4 @@
*/
package net.runelite.deob.deobfuscators.unusedclass;
public class EmptyClass
{
}
public class EmptyClass {}

View File

@@ -24,7 +24,4 @@
*/
package net.runelite.deob.deobfuscators.unusedclass;
public interface EmptyInterface
{
}
public interface EmptyInterface {}

View File

@@ -70,9 +70,7 @@ public class HookImporter
Assert.assertNotNull(is);
Gson gson = new Gson();
java.lang.reflect.Type type = new TypeToken<Map<String, ClassHook>>()
{
}.getType();
java.lang.reflect.Type type = new TypeToken<Map<String, ClassHook>>() {}.getType();
hooks = gson.fromJson(new InputStreamReader(is), type);
group = JarUtil.loadJar(IN);

View File

@@ -81,9 +81,7 @@ public class HookImporter
InputStream is = getClass().getResourceAsStream("hooks.json");
Gson gson = new Gson();
java.lang.reflect.Type type = new TypeToken<List<HookClass>>()
{
}.getType();
java.lang.reflect.Type type = new TypeToken<List<HookClass>>() {}.getType();
hooks = gson.fromJson(new InputStreamReader(is), type);
}

View File

@@ -115,9 +115,7 @@ public class AnimationClient
{
InputStream in = response.body().byteStream();
// CHECKSTYLE:OFF
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<AnimationKey>>()
{
}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<AnimationKey>>() {}.getType());
// CHECKSTYLE:ON
}
catch (JsonParseException ex)

View File

@@ -102,9 +102,7 @@ public class LootTrackerClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<LootRecord>>()
{
}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<LootRecord>>() {}.getType());
}
catch (JsonParseException ex)
{

View File

@@ -27,6 +27,4 @@ package net.runelite.http.api.ws.messages.party;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage;
public class Part extends WebsocketMessage implements Event
{
}
public class Part extends WebsocketMessage implements Event {}

View File

@@ -30,6 +30,4 @@ import net.runelite.api.events.Event;
@Value
@EqualsAndHashCode(callSuper = true)
public class UserSync extends PartyMemberMessage implements Event
{
}
public class UserSync extends PartyMemberMessage implements Event {}

View File

@@ -101,9 +101,7 @@ public class XteaClient
{
InputStream in = response.body().byteStream();
// CHECKSTYLE:OFF
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<XteaKey>>()
{
}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<XteaKey>>() {}.getType());
// CHECKSTYLE:ON
}
catch (JsonParseException ex)

View File

@@ -110,9 +110,7 @@ public class TwitterService
}
InputStream in = response.body().byteStream();
Type listType = new TypeToken<List<TwitterStatusesResponseItem>>()
{
}.getType();
Type listType = new TypeToken<List<TwitterStatusesResponseItem>>() {}.getType();
List<TwitterStatusesResponseItem> statusesResponse = RuneLiteAPI.GSON
.fromJson(new InputStreamReader(in), listType);

View File

@@ -58,9 +58,7 @@ public class OsbuddyClient
throw new IOException("Error retrieving summary from OSBuddy: " + responseOk.message());
}
Type type = new TypeToken<Map<Integer, OsbuddySummaryItem>>()
{
}.getType();
Type type = new TypeToken<Map<Integer, OsbuddySummaryItem>>() {}.getType();
return RuneLiteAPI.GSON.fromJson(responseOk.body().string(), type);
}

View File

@@ -29,7 +29,4 @@ import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(code = HttpStatus.NOT_FOUND, reason = "Not found")
public class NotFoundException extends RuntimeException
{
}
public class NotFoundException extends RuntimeException {}

View File

@@ -24,7 +24,4 @@
*/
package net.runelite.protocol.api.handshake;
public abstract class HandshakePacket
{
}
public abstract class HandshakePacket {}

View File

@@ -29,7 +29,4 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class LoginHandshakePacket extends HandshakePacket
{
}
public class LoginHandshakePacket extends HandshakePacket {}

View File

@@ -27,6 +27,4 @@ package net.runelite.api;
/**
* Represents the friend and ignore list manager.
*/
public interface FriendManager
{
}
public interface FriendManager {}

View File

@@ -27,6 +27,4 @@ package net.runelite.api;
/**
* Detects when the window is focused or unfocused.
*/
public interface KeyFocusListener
{
}
public interface KeyFocusListener {}

View File

@@ -27,6 +27,4 @@ package net.runelite.api;
/**
* Represents a chat entity that has a name.
*/
public interface Nameable extends Comparable
{
}
public interface Nameable extends Comparable {}

View File

@@ -33,6 +33,4 @@ import java.lang.annotation.RetentionPolicy;
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
public @interface VisibleForDevtools
{
}
public @interface VisibleForDevtools {}

View File

@@ -1,5 +1,3 @@
package net.runelite.api.events;
public interface Event
{
}
public interface Event {}

View File

@@ -37,6 +37,4 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
public @interface Alpha
{
}
public @interface Alpha {}

View File

@@ -1,5 +1,3 @@
package net.runelite.client.config;
public class Button
{
}
public class Button {}

View File

@@ -24,6 +24,4 @@
*/
package net.runelite.client.config;
public interface Config
{
}
public interface Config {}

View File

@@ -1,5 +1,3 @@
package net.runelite.client.config;
public class Title
{
}
public class Title {}

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -24,6 +24,4 @@
*/
package net.runelite.client.plugins.achievementdiary;
public interface Requirement
{
}
public interface Requirement {}

View File

@@ -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;

View File

@@ -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)

View File

@@ -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())
{

View File

@@ -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();

View File

@@ -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 {}

View File

@@ -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)

View File

@@ -1,5 +1,3 @@
package net.runelite.client.plugins.menuentryswapper.util;
public class HerbNotFoundException extends RuntimeException
{
}
public class HerbNotFoundException extends RuntimeException {}

View File

@@ -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)

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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());
}
}

View File

@@ -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

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -31,8 +31,6 @@ public class HiscorePanelTest
@Test
public void testConstructor()
{
new HiscorePanel(new HiscorePlugin()
{
});
new HiscorePanel(new HiscorePlugin() {});
}
}

View File

@@ -31,7 +31,4 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
public @interface Inject
{
}
public @interface Inject {}

View File

@@ -34,18 +34,15 @@ import java.lang.annotation.Target;
* Inject a method to create and construct an object.
* The object type is inferred from the return value
* of the method.
*
*
* {@code
* {@literal @}Construct
* RSIndexedImage createIndexedImage();
* }
*
*
* @author Adam
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
public @interface Construct
{
}
public @interface Construct {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSCanvas
{
}
public interface RSCanvas {}

View File

@@ -2,6 +2,4 @@ package net.runelite.rs.api;
import net.runelite.api.ClanMember;
public interface RSClanMate extends RSBuddy, ClanMember
{
}
public interface RSClanMate extends RSBuddy, ClanMember {}

View File

@@ -24,6 +24,4 @@
*/
package net.runelite.rs.api;
public interface RSDecimator
{
}
public interface RSDecimator {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSFont extends RSAbstractFont
{
}
public interface RSFont extends RSAbstractFont {}

View File

@@ -2,6 +2,4 @@ package net.runelite.rs.api;
import net.runelite.api.Friend;
public interface RSFriend extends Friend, RSBuddy
{
}
public interface RSFriend extends Friend, RSBuddy {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSFriendsList extends RSUserList<RSFriend>
{
}
public interface RSFriendsList extends RSUserList<RSFriend> {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSIgnoreList extends RSUserList<RSIgnored>
{
}
public interface RSIgnoreList extends RSUserList<RSIgnored> {}

View File

@@ -2,6 +2,4 @@ package net.runelite.rs.api;
import net.runelite.api.Ignore;
public interface RSIgnored extends Ignore, RSUser
{
}
public interface RSIgnored extends Ignore, RSUser {}

View File

@@ -4,6 +4,4 @@ import net.runelite.api.KeyFocusListener;
import java.awt.event.FocusListener;
import java.awt.event.KeyListener;
public interface RSKeyHandler extends KeyListener, FocusListener, KeyFocusListener
{
}
public interface RSKeyHandler extends KeyListener, FocusListener, KeyFocusListener {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSLoginType
{
}
public interface RSLoginType {}

View File

@@ -4,6 +4,4 @@ import java.awt.event.FocusListener;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
public interface RSMouseHandler extends MouseListener, MouseMotionListener, FocusListener
{
}
public interface RSMouseHandler extends MouseListener, MouseMotionListener, FocusListener {}

View File

@@ -2,6 +2,4 @@ package net.runelite.rs.api;
import java.awt.event.MouseWheelListener;
public interface RSMouseWheelHandler extends MouseWheelListener
{
}
public interface RSMouseWheelHandler extends MouseWheelListener {}

View File

@@ -1,5 +1,3 @@
package net.runelite.rs.api;
public interface RSPacketBuffer
{
}
public interface RSPacketBuffer {}

View File

@@ -24,6 +24,4 @@
*/
package net.runelite.rs.api;
public interface RSPcmStream
{
}
public interface RSPcmStream {}

View File

@@ -1,5 +1,4 @@
import net.runelite.mapping.ObfuscatedName;
@ObfuscatedName("fu")
public interface class161 {
}
public interface class161 {}

View File

@@ -1,5 +1,4 @@
import net.runelite.mapping.ObfuscatedName;
@ObfuscatedName("fo")
public interface class181 {
}
public interface class181 {}

View File

@@ -1,4 +1,3 @@
package net.runelite.rs;
public class Opcodes {
}
public class Opcodes {}