mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-06-03 06:12:15 +00:00
docs: update raii
This commit is contained in:
+1
-1
@@ -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.");
|
||||
|
||||
+1
-2
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user