@Contract
is currently defined as follows.
public @interface Contract {
String value() default "";
}
That allows empty declarations such as @Contract
or @Contract()
; however, a contract is not useful without declared constraints.
In light of that, we should remove the default ""
declaration in order to force users to provide explicit constraints.
Even though one could technically still declare the annotation without constraints via @Contract("")
, it's unlikely that anyone would intentionally do that.