docs: update raii

This commit is contained in:
Ilkka Seppälä committed 2024-05-19 10:49:08 +03:00
1 parent f6d77a684e
commit a8433cc634
3 files changed
+91 -89

No files matched your search

@@ -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));
}
}
}