-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
@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.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement