Skip to content

Commit

Permalink
Move OJMLTEST__getCustomer JML specs to JML file
Browse files Browse the repository at this point in the history
Apparently, if a JML spec file exists, OpenJML ignores specs defined in
the Java source file.  In other words, any existing JML file supersedes
Java files in terms of JML specs.
  • Loading branch information
bzp99 committed May 14, 2024
1 parent b3a74c0 commit 0ab918e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ public final class TPCC implements ContractInterface {
@*/
private StockLevelOutput stockLevel(final TPCCContext ctx, final StockLevelInput input)
throws EntityNotFoundException, NotFoundException;

/*@
@ requires c_id < 2;
@*/
public String OJMLTEST__getCustomer(final TPCCContext ctx, final int c_w_id, final int c_d_id, final int c_id);
}
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ public String ping(final TPCCContext ctx) {
* @return The customer with matching (C_W_ID, C_D_ID, C_ID), unless C_ID >= 2, in which case an
* exception should be thrown by OpenJML
*/
// spotless:off
//@ requires c_id < 2;
// spotless:on
@Transaction(intent = Transaction.TYPE.EVALUATE)
public String OJMLTEST__getCustomer(
final TPCCContext ctx, final int c_w_id, final int c_d_id, final int c_id) {
Expand Down

0 comments on commit 0ab918e

Please sign in to comment.