Skip to content

Commit

Permalink
[Java] Remove unnecessary anonymous inner classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Nov 17, 2023
1 parent cb6ba7c commit 5d58bd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@ class ChannelValidationTest
@RegisterExtension
final SystemTestWatcher watcher = new SystemTestWatcher();

private final MediaDriver.Context context = new MediaDriver.Context();
{
context
.errorHandler((ignore) -> {})
.dirDeleteOnStart(true)
.publicationConnectionTimeoutNs(TimeUnit.MILLISECONDS.toNanos(500))
.timerIntervalNs(TimeUnit.MILLISECONDS.toNanos(100));
}
private final MediaDriver.Context context = new MediaDriver.Context()
.errorHandler((ignore) -> {})
.dirDeleteOnStart(true)
.publicationConnectionTimeoutNs(TimeUnit.MILLISECONDS.toNanos(500))
.timerIntervalNs(TimeUnit.MILLISECONDS.toNanos(100));

private final ArrayList<AutoCloseable> closeables = new ArrayList<>();

Expand Down
13 changes: 5 additions & 8 deletions aeron-system-tests/src/test/java/io/aeron/ErrorHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ class ErrorHandlerTest
@RegisterExtension
final SystemTestWatcher watcher = new SystemTestWatcher();

private final MediaDriver.Context context = new MediaDriver.Context();
{
context
.errorHandler((ignore) -> {})
.dirDeleteOnStart(true)
.publicationConnectionTimeoutNs(TimeUnit.MILLISECONDS.toNanos(500))
.timerIntervalNs(TimeUnit.MILLISECONDS.toNanos(100));
}
private final MediaDriver.Context context = new MediaDriver.Context()
.errorHandler((ignore) -> {})
.dirDeleteOnStart(true)
.publicationConnectionTimeoutNs(TimeUnit.MILLISECONDS.toNanos(500))
.timerIntervalNs(TimeUnit.MILLISECONDS.toNanos(100));

private final ArrayList<AutoCloseable> closeables = new ArrayList<>();

Expand Down

0 comments on commit 5d58bd1

Please sign in to comment.