docs: update raii

This commit is contained in:
Ilkka Seppälä
2024-05-19 10:49:08 +03:00
parent f6d77a684e
commit a8433cc634
3 changed files with 91 additions and 89 deletions
@@ -51,7 +51,7 @@ public class App {
/**
* Program entry point.
*/
public static void main(String[] args) throws Exception {
public static void main(String[] args) {
try (var ignored = new SlidingDoor()) {
LOGGER.info("Walking in.");
@@ -68,7 +68,7 @@ class ClosableTest {
/**
* Logging Appender Implementation
*/
class InMemoryAppender extends AppenderBase<ILoggingEvent> {
static class InMemoryAppender extends AppenderBase<ILoggingEvent> {
private final List<ILoggingEvent> log = new LinkedList<>();
public InMemoryAppender() {
@@ -85,5 +85,4 @@ class ClosableTest {
return log.stream().anyMatch(event -> event.getMessage().equals(message));
}
}
}