I just stepped over some old code and did a SonarLint analysis. I cannot paste the code here but basically it is similar to:
Object test = new Object[]{"1"};
System.out.println(((Object[])test)[0]);
This very simple example works, but SonarLint reports an issue on squid:S1905 - Redundant casts should not be used
Any ideas why?