- Joined
- Apr 27, 2019
- Messages
- 11
- Thread Author
- #1
RuneMate version: 2.99.7
Affected games: OSRS (probably all, but I'm only using it here)
Code used:
Stack trace:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.runemate.game.api.hybrid.local.hud.interfaces.SpriteItem;
Comments:
This exception has occurred any time I've used any QueryResults object's toArray method. Yes, I do realize there is very little reason to cast QueryResults to an array. Found while quickly doing something to test some code.
Affected games: OSRS (probably all, but I'm only using it here)
Code used:
Code:
Inventory.newQuery().names(inventoryItem.getDefinition().getName()).results().toArray();
Stack trace:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.runemate.game.api.hybrid.local.hud.interfaces.SpriteItem;
Comments:
This exception has occurred any time I've used any QueryResults object's toArray method. Yes, I do realize there is very little reason to cast QueryResults to an array. Found while quickly doing something to test some code.