Skip to content

Commit ed28390

Browse files
scordiosdeleuze
authored andcommitted
Refine @Contract Javadoc
This commit removes references to the `pure` attribute. Relates to gh-33820. Closes gh-35285 Signed-off-by: Stefano Cordio <[email protected]>
1 parent e208506 commit ed28390

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-core/src/main/java/org/springframework/lang/Contract.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
* <p>The additional return values denote the following:
5252
* <ul>
5353
* <li>{@code fail} - the method throws an exception, if the arguments satisfy argument constraints
54-
* <li>{@code new} - the method returns a non-null new object which is distinct from any other object existing in the heap prior to method execution. If method is also pure, then we can be sure that the new object is not stored to any field/array and will be lost if method return value is not used.
54+
* <li>{@code new} - the method returns a non-null new object which is distinct from any other object existing in the heap prior to method execution.
55+
* If the method has no visible side effects, then we can be sure that the new object is not stored to any field/array and will be lost if the method's return value is not used.
5556
* <li>{@code this} - the method returns its qualifier value (not applicable for static methods)
5657
* <li>{@code param1, param2, ...} - the method returns its first (second, ...) parameter value
5758
* </ul>

0 commit comments

Comments
 (0)