The example snippet in the `jdk.shell` javadoc (*) doesn't compile as it tries to access private fields in `jdk.jshell.SnippetEvent`. Using accessors methods instead will make the code compile.
`e.causeSnippet` -> `e.causeSnippet()`
`e.status -> `e.status()`
`e.previousStatus` -> `e.previousStatus()`
`e.value` -> `e.value()`
`e.snippet.source` -> `e.snippet.source()`
PS: `import java.io.ByteArrayInputStream;`seems unneeded.
(*) https://docs.oracle.com/en/java/javase/15/docs/api/jdk.jshell/jdk/jshell/package-summary.html
`e.causeSnippet` -> `e.causeSnippet()`
`e.status -> `e.status()`
`e.previousStatus` -> `e.previousStatus()`
`e.value` -> `e.value()`
`e.snippet.source` -> `e.snippet.source()`
PS: `import java.io.ByteArrayInputStream;`seems unneeded.
(*) https://docs.oracle.com/en/java/javase/15/docs/api/jdk.jshell/jdk/jshell/package-summary.html