Skip to content

Commit

Permalink
Add note in readme to guard against NPEs in cyclical states (#31)
Browse files Browse the repository at this point in the history
* Add note in readme to guard against NPEs in cyclical states

* rgrnwd to codeowners
  • Loading branch information
Synesso authored Apr 29, 2024
1 parent bbb52e1 commit 64f7967
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @synesso @cwmyers @aparkersquare @mmollaverdi @hugomd
* @synesso @cwmyers @aparkersquare @mmollaverdi @hugomd @rgrnwd
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ data object Amber : Color({ setOf(Red) })
data object Red : Color({ setOf(Green) })
```

<aside>
Be sure to define your state constructor with functions rather than literal values if you require cycles in your state
machine. Otherwise, you are likely to encounter null pointer exceptions.
</aside>

### Value

The value is responsible for knowing and updating its current state.
Expand Down

0 comments on commit 64f7967

Please sign in to comment.