Skip to content

Commit

Permalink
Comment reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
  • Loading branch information
jbescos committed May 28, 2024
1 parent 69ecddc commit 5b11609
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 41 deletions.
1 change: 0 additions & 1 deletion common/configurable/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
requires io.helidon.builder.api;
requires io.helidon.common.context;
requires java.management;
requires java.logging;

requires transitive io.helidon.common.config;
requires transitive io.helidon.common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
* Copyright (c) 2019, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.logging.Handler;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.stream.IntStream;

import org.awaitility.core.ConditionTimeoutException;
Expand Down Expand Up @@ -279,40 +276,6 @@ void testNullRejectionPolicy() {
), "rejectionPolicy is null");
}

@Test
void testCannotChangeMaxPoolSize() {
pool = newPool(2, 2, 100, 25);
Logger log = Logger.getLogger(ThreadPool.class.getName());
assertThat(log.getHandlers().length, is(0));
assertThat(log.getUseParentHandlers(), is(true));
List<LogRecord> logRecords = new ArrayList<>();
Handler handler = new Handler() {
@Override
public void publish(LogRecord record) {
logRecords.add(record);
}

@Override
public void flush() {
}

@Override
public void close() throws SecurityException {
}
};

try {
log.addHandler(handler);
assertThat(pool.getMaximumPoolSize(), is(2));
pool.setMaximumPoolSize(4);
assertThat(pool.getMaximumPoolSize(), is(2));
assertThat(logRecords.size(), is(1));
assertThat(logRecords.get(0).getMessage(), containsString("cannot be changed"));
} finally {
log.removeHandler(handler);
}
}

@Test
void testSetRejectionHandlerRequiresRejectionPolicy() {
pool = newPool(2, 2, 100, 25);
Expand Down
1 change: 0 additions & 1 deletion helidon/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// this is required due to a bug in JDK (see Main for details and link)
requires java.logging;


requires io.helidon.common;
requires io.helidon.logging.common;

Expand Down
1 change: 0 additions & 1 deletion webserver/observe/log/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@

provides io.helidon.webserver.observe.spi.ObserveProvider
with io.helidon.webserver.observe.log.LogObserveProvider;

}

0 comments on commit 5b11609

Please sign in to comment.