Not exactly sure if this is a false-positive, but it is strange.
private final LinkedList<String> list = new LinkedList<>();
...
Iterator<String> descendingIterator = list.descendingIterator();
String value = list.getLast();
Technically, the rule is correct. However, the List interface doesn't have descendingIterator, neither does it have getLast and some other useful methods. I guess that when such methods are used, this warning should be disabled? Or do you think that this is bad design nonetheless and people should try to use other methods that are in the interface to simulate those (that certainly is possible, however more inconvenient)? I'm interested on more opinions.
Not exactly sure if this is a false-positive, but it is strange.
Technically, the rule is correct. However, the
Listinterface doesn't havedescendingIterator, neither does it havegetLastand some other useful methods. I guess that when such methods are used, this warning should be disabled? Or do you think that this is bad design nonetheless and people should try to use other methods that are in the interface to simulate those (that certainly is possible, however more inconvenient)? I'm interested on more opinions.