Skip to content

Commit

Permalink
Remove the pure attribute from @Contract
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze committed Oct 30, 2024
1 parent 74997b5 commit 10e0db6
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions spring-core/src/main/java/org/springframework/lang/Contract.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
*
* The constraints denote the following:<br/>
* <ul>
* <li> _ - any value</li>
* <li> null - null value</li>
* <li> !null - a value statically proved to be not-null</li>
* <li> true - true boolean value</li>
* <li> false - false boolean value</li>
* <li> fail - the method throws an exception, if the arguments satisfy argument
* <li> <code>_</code> - any value</li>
* <li> <code>null</code> - null value</li>
* <li> <code>!null</code> - a value statically proved to be not-null</li>
* <li> <code>true</code> - true boolean value</li>
* <li> <code>false</code> - false boolean value</li>
* <li> <code>fail</code> - the method throws an exception, if the arguments satisfy argument
* constraints</li>
* </ul>
* <p>Examples:
Expand All @@ -60,7 +60,8 @@
*
* @author Sebastien Deleuze
* @since 6.2
* @see <a href="https://github.com/uber/NullAway/wiki/Configuration#custom-contract-annotations">NullAway custom contract annotations</a>
* @see <a href="https://github.com/uber/NullAway/wiki/Configuration#custom-contract-annotations">
* NullAway custom contract annotations</a>
*/
@Documented
@Retention(RetentionPolicy.CLASS)
Expand All @@ -71,10 +72,4 @@
* Contains the contract clauses describing causal relations between call arguments and the returned value.
*/
String value() default "";

/**
* Specifies if this method is pure, i.e. has no visible side effects. This may be used for more precise data flow analysis, and
* to check that the method's return value is actually used in the call place.
*/
boolean pure() default false;
}

0 comments on commit 10e0db6

Please sign in to comment.