Sa'ad
Sa'ad

Reputation: 5305

Intellij's Inspection on interface declaring incompatible 'Object' method

I am in the process of setting up an Inspection Profile to match Errors/Warnings Preferences of Eclipse. One of the rule in Eclipse is

"Interface method conflicts with protected 'Object' method"

whereby an interface declared as

interface I {
   int clone();
}

is flagged as a warning. Which is rightly done because no class can implement this as it is incompatible with the signature of Object's clone method.

How can I have a similar warning shown in IntelliJ. I have failed to find an inspection rule in IntelliJ corresponding to the Eclipse's one.

Upvotes: 2

Views: 133

Answers (1)

Bas Leijdekkers
Bas Leijdekkers

Reputation: 26462

Since IntelliJ IDEA 16 the Interface method clashes with method in 'java.lang.Object' inspection is available to warn about this issue.

Upvotes: 2

Related Questions