project: Fix deprecations and supress unchecked warnings

This commit is contained in:
Owain van Brakel
2019-07-25 20:08:45 +02:00
parent 481831359b
commit 17b35205fd
40 changed files with 113 additions and 263 deletions

View File

@@ -1410,7 +1410,7 @@ public abstract class RSClientMixin implements RSClient
}
// Get the message node which was added
Map<Integer, RSChatChannel> chatLineMap = client.getChatLineMap();
@SuppressWarnings("unchecked") Map<Integer, RSChatChannel> chatLineMap = client.getChatLineMap();
RSChatChannel chatLineBuffer = chatLineMap.get(type);
MessageNode messageNode = chatLineBuffer.getLines()[0];
@@ -1431,7 +1431,7 @@ public abstract class RSClientMixin implements RSClient
public static void renderWidgetLayer(Widget[] widgets, int parentId, int minX, int minY, int maxX, int maxY, int x, int y, int var8)
{
Callbacks callbacks = client.getCallbacks();
HashTable<WidgetNode> componentTable = client.getComponentTable();
@SuppressWarnings("unchecked") HashTable<WidgetNode> componentTable = client.getComponentTable();
for (Widget rlWidget : widgets)
{

View File

@@ -143,7 +143,7 @@ public abstract class RSWidgetMixin implements RSWidget
// parent id potentially incorrect
// check the parent in the component table
HashTable<WidgetNode> componentTable = client.getComponentTable();
@SuppressWarnings("unchecked") HashTable<WidgetNode> componentTable = client.getComponentTable();
WidgetNode widgetNode = componentTable.get(parentId);
if (widgetNode == null || widgetNode.getId() != TO_GROUP(id))
{
@@ -380,7 +380,7 @@ public abstract class RSWidgetMixin implements RSWidget
return new Widget[0];
}
HashTable<WidgetNode> componentTable = client.getComponentTable();
@SuppressWarnings("unchecked") HashTable<WidgetNode> componentTable = client.getComponentTable();
WidgetNode wn = componentTable.get(getId());
if (wn == null)