1515 */
1616package net .automatalib .automaton .procedural .impl ;
1717
18- import org .checkerframework .checker .nullness .qual .EnsuresNonNullIf ;
1918import org .checkerframework .checker .nullness .qual .Nullable ;
2019
2120/**
@@ -54,21 +53,25 @@ StackState<S, I, P> push(P newProcedure, S newState) {
5453 return new StackState <>(this , newProcedure , newState );
5554 }
5655
56+ @ SuppressWarnings ("return" ) // since this method is package-private, we are happy to only assert nullability
5757 StackState <S , I , P > pop () {
5858 assert !isStatic () : "This method should never be called on static states" ;
5959 return prev ;
6060 }
6161
62+ @ SuppressWarnings ("type" ) // since this method is package-private, we are happy to only assert nullability
6263 StackState <S , I , P > updateState (S state ) {
6364 assert !isStatic () : "This method should never be called on static states" ;
6465 return new StackState <>(prev , procedure , state );
6566 }
6667
68+ @ SuppressWarnings ("return" ) // since this method is package-private, we are happy to only assert nullability
6769 P getProcedure () {
6870 assert !isStatic () : "This method should never be called on static states" ;
6971 return procedure ;
7072 }
7173
74+ @ SuppressWarnings ("return" ) // since this method is package-private, we are happy to only assert nullability
7275 S getCurrentState () {
7376 assert !isStatic () : "This method should never be called on static states" ;
7477 return procedureState ;
@@ -92,9 +95,6 @@ boolean isTerm() {
9295 return this == TERM ;
9396 }
9497
95- // contract is satisfied by definition of constructors
96- @ SuppressWarnings ("contracts.conditional.postcondition" )
97- @ EnsuresNonNullIf (expression = {"this.prev" , "this.procedure" , "this.procedureState" }, result = false )
9898 private boolean isStatic () {
9999 return isInit () || isTerm ();
100100 }
0 commit comments