java:S1214 does not detect inheritance

Using Sonarqube 9.0 Developer Edition:

We get issues for rule java:S1214 in the following scenario for class FooBarHandler :

public interface FooBarHandler extends BarHandler {
  String LISTENER = "xy";
public interface BarHandler extends Handler<UUID, String> {
  String FACTORY = "ab";
public interface Handler<K, V extends GeneratedMessageV3> {
  void send(K key, V message);
  void delete();
  void create();
  void startListen();
  void stopListen();

According to description this rule should not flag any class because all force to implement methods. At least thats my understanding.

Kind regards,

1 Like

Hello @reitzmichnicht

It makes sense to me, it seems like a legitimate use case. Ticket created: SONARJAVA-4014.

Thanks for reporting this issue.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.