dungeonqueer Posted September 29, 2017 Share Posted September 29, 2017 When using this code: getObjects().closest(Entity::exists, obj -> objList.contains(obj)); I'm met with: Quote Unchecked generics array creation for varargs parameter Is this incorrect use of the EntityApi's #closest method usage? It accepts a varargs parameter of Filter<RS2Object>. Quote Link to comment Share on other sites More sharing options...
TheWind Posted September 29, 2017 Share Posted September 29, 2017 yes its correct Quote Link to comment Share on other sites More sharing options...
Apaec Posted September 29, 2017 Share Posted September 29, 2017 Your code is OK, I think this is a problem with the ambiguity that generics cause with the compiler. Quote Link to comment Share on other sites More sharing options...
dungeonqueer Posted September 29, 2017 Author Share Posted September 29, 2017 1 minute ago, Apaec said: Your code is OK, I think this is a problem with the ambiguity that generics cause with the compiler. What would be an alternative that wouldn't cause ambiguity? Quote Link to comment Share on other sites More sharing options...
Explv Posted September 29, 2017 Share Posted September 29, 2017 2 hours ago, dungeonqueer said: What would be an alternative that wouldn't cause ambiguity? You will find these warnings frequently with the OSBot API, just ignore them. Quote Link to comment Share on other sites More sharing options...
Apaec Posted September 29, 2017 Share Posted September 29, 2017 14 hours ago, dungeonqueer said: What would be an alternative that wouldn't cause ambiguity? Not that I can think of. Unfortunately you will either have to ignore or suppress it! Quote Link to comment Share on other sites More sharing options...