I have a method that has the @CallSuper
annotation, which forces sub classes to call super.methodName()
. A subclass overrides this method and tries to throw an UnsupportedOperationException
, but the compiler is still complaining that I haven't called the super method. Is there an easy way around this?
我发现可以使用@SuppressLint("MissingSuperCall")
取消警告。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.