We have a third-party library method which is overloaded to accept one or more arguments. We found that using the single parameter variation is problematic and want IntelliJ to warn the user when that variation is being used. Does anyone know how to set up this code inspection rule?
Using the @Deprecated Annotation To use it, you simply precede the class, method, or member declaration with "@Deprecated." Using the @Deprecated annotation to deprecate a class, method, or field ensures that all compilers will issue warnings when code uses that program element.
Use both @Deprecated annotation and the @deprecated JavaDoc tag. The @deprecated JavaDoc tag is used for documentation purposes. The @Deprecated annotation instructs the compiler that the method is deprecated.
A deprecated library is a library without any support. It also means that as other libraries improve (such as the rails framework), they will become incompatible with the deprecated library. If you are trying to stay current with those libraries, you might be forced to migrate to the new version.
Use the Structural Search Inspection. You can copy the existing method calls templates and modify it for your needs. This way you get a warning in the editor the moment the unwanted method call it written.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With