From 378c04e5f05230e4a337c63438e346771577f089 Mon Sep 17 00:00:00 2001 From: Tomas Langer Date: Fri, 14 Oct 2022 15:28:37 +0200 Subject: [PATCH] Fixes for packaging tests. Review fix (metrics) --- .../helidon/common/http/MethodPredicates.java | 5 ++++ etc/scripts/test-packaging-jar.sh | 8 ++--- etc/scripts/test-packaging-jlink.sh | 8 +++-- .../micrometer/MeterRegistryFactory.java | 4 +-- .../metrics/src/main/java/module-info.java | 2 ++ .../server/JaxRsCdiExtension.java | 4 +-- .../{JaxRsHandler.java => JaxRsService.java} | 29 +++++++++++++------ .../server/ServerCdiExtension.java | 8 ++--- .../server/src/main/java/module-info.java | 4 +-- .../server/JerseyPropertiesTest.java | 4 +-- .../tracing/MpTracingContextFilter.java | 12 ++++++-- .../microprofile/tracing/MpTracingFilter.java | 12 ++++++-- .../tracing/src/main/java/module-info.java | 4 +-- .../integration/jersey/SecurityFilter.java | 23 +++++++++++---- .../jersey/SecurityFilterCommon.java | 11 ++----- .../jersey/SecurityPreMatchingFilter.java | 16 +++++++--- .../jersey/src/main/java/module-info.java | 7 ++--- .../jersey/TestAnnotAnalyzers.java | 4 +-- .../native-image/mp-1/logging.properties | 13 ++++----- .../mp-1/src/main/java/module-info.java | 6 ++-- 20 files changed, 114 insertions(+), 70 deletions(-) rename microprofile/server/src/main/java/io/helidon/microprofile/server/{JaxRsHandler.java => JaxRsService.java} (94%) diff --git a/common/http/src/main/java/io/helidon/common/http/MethodPredicates.java b/common/http/src/main/java/io/helidon/common/http/MethodPredicates.java index e10ac622710..27bed67062c 100644 --- a/common/http/src/main/java/io/helidon/common/http/MethodPredicates.java +++ b/common/http/src/main/java/io/helidon/common/http/MethodPredicates.java @@ -38,6 +38,11 @@ public boolean test(Http.Method t) { public Set acceptedMethods() { return Set.of(); } + + @Override + public String toString() { + return "(any method)"; + } } static class SingleMethodEnumPredicate implements MethodPredicate { diff --git a/etc/scripts/test-packaging-jar.sh b/etc/scripts/test-packaging-jar.sh index 9ad4fa9fcb4..73e15c9d2de 100755 --- a/etc/scripts/test-packaging-jar.sh +++ b/etc/scripts/test-packaging-jar.sh @@ -44,10 +44,10 @@ java -Dexit.on.started=! -jar target/helidon-tests-native-image-se-1.jar # cd ${WS_DIR}/tests/integration/native-image/mp-1 # Classpath -java -jar target/helidon-tests-native-image-mp-1.jar +java --enable-preview -jar target/helidon-tests-native-image-mp-1.jar # Module Path -java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ +java --enable-preview --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main # @@ -55,10 +55,10 @@ java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ # cd ${WS_DIR}/tests/integration/native-image/mp-3 # Classpath -java -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar +java --enable-preview -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar # Module Path -java -Dexit.on.started=! \ +java --enable-preview -Dexit.on.started=! \ --module-path target/helidon-tests-native-image-mp-3.jar:target/libs \ --add-modules helidon.tests.nimage.quickstartmp \ --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/etc/scripts/test-packaging-jlink.sh b/etc/scripts/test-packaging-jlink.sh index 9e3be46c9d3..f302b0d6a5c 100755 --- a/etc/scripts/test-packaging-jlink.sh +++ b/etc/scripts/test-packaging-jlink.sh @@ -45,17 +45,18 @@ cd ${WS_DIR}/tests/integration/native-image/se-1 jri_dir=${WS_DIR}/tests/integration/native-image/se-1/target/helidon-tests-native-image-se-1-jri # Classpath -${jri_dir}/bin/start --test +${jri_dir}/bin/start --test --jvm --enable-preview # Run MP-1 cd ${WS_DIR}/tests/integration/native-image/mp-1 jri_dir=${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1-jri # Classpath -${jri_dir}/bin/start +${jri_dir}/bin/start --jvm --enable-preview # Module Path ${jri_dir}/bin/java \ + --enable-preview \ --module-path ${jri_dir}/app/helidon-tests-native-image-mp-1.jar:${jri_dir}/app/libs \ --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main @@ -64,10 +65,11 @@ cd ${WS_DIR}/tests/integration/native-image/mp-3 jri_dir=${WS_DIR}/tests/integration/native-image/mp-3/target/helidon-tests-native-image-mp-3-jri # Classpath -${jri_dir}/bin/start --test +${jri_dir}/bin/start --test --jvm --enable-preview # Module Path ${jri_dir}/bin/java -Dexit.on.started=! \ + --enable-preview \ --module-path ${jri_dir}/app/helidon-tests-native-image-mp-3.jar:${jri_dir}/app/libs \ --add-modules helidon.tests.nimage.quickstartmp \ --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/integrations/micrometer/micrometer/src/main/java/io/helidon/integrations/micrometer/MeterRegistryFactory.java b/integrations/micrometer/micrometer/src/main/java/io/helidon/integrations/micrometer/MeterRegistryFactory.java index 18a2b186565..cbc435d8929 100644 --- a/integrations/micrometer/micrometer/src/main/java/io/helidon/integrations/micrometer/MeterRegistryFactory.java +++ b/integrations/micrometer/micrometer/src/main/java/io/helidon/integrations/micrometer/MeterRegistryFactory.java @@ -232,9 +232,9 @@ static BuiltInRegistryType valueByName(String name) throws UnrecognizedBuiltInRe Handler matchingHandler(ServerRequest serverRequest, ServerResponse serverResponse) { return registryEnrollments.stream() .map(e -> e.handlerFn().apply(serverRequest)) - .findFirst() .filter(Optional::isPresent) .map(Optional::get) + .findFirst() .orElse((req, res) -> res .status(Http.Status.NOT_ACCEPTABLE_406) .send(NO_MATCHING_REGISTRY_ERROR_MESSAGE)); @@ -244,9 +244,9 @@ io.helidon.nima.webserver.http.Handler matchingHandler(io.helidon.nima.webserver io.helidon.nima.webserver.http.ServerResponse serverResponse) { return nimaRegistryEnrollments.stream() .map(e -> e.handlerFn().apply(serverRequest)) - .findFirst() .filter(Optional::isPresent) .map(Optional::get) + .findFirst() .orElse((req, res) -> res .status(Http.Status.NOT_ACCEPTABLE_406) .send(NO_MATCHING_REGISTRY_ERROR_MESSAGE)); diff --git a/metrics/metrics/src/main/java/module-info.java b/metrics/metrics/src/main/java/module-info.java index 243312142da..61ed67840be 100644 --- a/metrics/metrics/src/main/java/module-info.java +++ b/metrics/metrics/src/main/java/module-info.java @@ -31,6 +31,8 @@ exports io.helidon.metrics; + uses io.helidon.metrics.api.spi.ExemplarService; + provides io.helidon.metrics.api.spi.RegistryFactoryProvider with io.helidon.metrics.RegistryFactoryProviderImpl; provides io.helidon.common.configurable.spi.ExecutorServiceSupplierObserver with io.helidon.metrics.ExecutorServiceMetricsObserver; diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java index fb2e20bbbb8..e87883aa60a 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java @@ -274,13 +274,13 @@ public Set> getClasses() { .build()); } - JaxRsHandler toJerseySupport(JaxRsApplication jaxRsApplication, + JaxRsService toJerseySupport(JaxRsApplication jaxRsApplication, InjectionManager injectionManager) { ResourceConfig resourceConfig = jaxRsApplication.resourceConfig(); resourceConfig.register(new CatchAllExceptionMapper()); - return JaxRsHandler.create(resourceConfig, + return JaxRsService.create(resourceConfig, injectionManager); } diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsHandler.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsService.java similarity index 94% rename from microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsHandler.java rename to microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsService.java index 011cb6da2cb..51a3f5be141 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsHandler.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsService.java @@ -41,7 +41,8 @@ import io.helidon.common.uri.UriPath; import io.helidon.microprofile.server.HelidonHK2InjectionManagerFactory.InjectionManagerWrapper; import io.helidon.nima.webserver.KeyPerformanceIndicatorSupport; -import io.helidon.nima.webserver.http.Handler; +import io.helidon.nima.webserver.http.HttpRules; +import io.helidon.nima.webserver.http.HttpService; import io.helidon.nima.webserver.http.ServerRequest; import io.helidon.nima.webserver.http.ServerResponse; @@ -67,13 +68,13 @@ import static org.glassfish.jersey.CommonProperties.PROVIDER_DEFAULT_DISABLE; import static org.glassfish.jersey.server.ServerProperties.WADL_FEATURE_DISABLE; -class JaxRsHandler implements Handler { +class JaxRsService implements HttpService { /** * If set to {@code "true"}, Jersey will ignore responses in exceptions. */ static final String IGNORE_EXCEPTION_RESPONSE = "jersey.config.client.ignoreExceptionResponse"; - private static final System.Logger LOGGER = System.getLogger(JaxRsHandler.class.getName()); + private static final System.Logger LOGGER = System.getLogger(JaxRsService.class.getName()); private static final Type REQUEST_TYPE = (new GenericType>() { }).getType(); private static final Type RESPONSE_TYPE = (new GenericType>() { }).getType(); private static final Set INJECTION_MANAGERS = Collections.newSetFromMap(new WeakHashMap<>()); @@ -83,7 +84,7 @@ class JaxRsHandler implements Handler { private final Container container; private final Application application; - private JaxRsHandler(ResourceConfig resourceConfig, + private JaxRsService(ResourceConfig resourceConfig, ApplicationHandler appHandler, Container container) { this.resourceConfig = resourceConfig; @@ -92,7 +93,7 @@ private JaxRsHandler(ResourceConfig resourceConfig, this.application = getApplication(resourceConfig); } - static JaxRsHandler create(ResourceConfig resourceConfig, InjectionManager injectionManager) { + static JaxRsService create(ResourceConfig resourceConfig, InjectionManager injectionManager) { resourceConfig.property(PROVIDER_DEFAULT_DISABLE, "ALL"); resourceConfig.property(WADL_FEATURE_DISABLE, "true"); @@ -113,7 +114,7 @@ static JaxRsHandler create(ResourceConfig resourceConfig, InjectionManager injec System.setProperty(IGNORE_EXCEPTION_RESPONSE, ignore); } - return new JaxRsHandler(resourceConfig, appHandler, container); + return new JaxRsService(resourceConfig, appHandler, container); } static String basePath(UriPath path) { @@ -131,7 +132,11 @@ static String basePath(UriPath path) { } @Override - public void handle(ServerRequest req, ServerResponse res) { + public void routing(HttpRules rules) { + rules.any(this::handle); + } + + private void handle(ServerRequest req, ServerResponse res) { Contexts.runInContext(req.context(), () -> doHandle(req.context(), req, res)); } @@ -184,10 +189,16 @@ private static URI baseUri(ServerRequest req) { private void doHandle(Context ctx, ServerRequest req, ServerResponse res) { URI baseUri = baseUri(req); + URI requestUri; + + if (req.query().isEmpty()) { + requestUri = baseUri.resolve(req.path().rawPath()); + } else { + requestUri = baseUri.resolve(req.path().rawPath() + "?" + req.query().rawValue()); + } ContainerRequest requestContext = new ContainerRequest(baseUri, - baseUri.resolve(req.path().rawPath() + "?" + req.query() - .rawValue()), + requestUri, req.prologue().method().text(), new HelidonMpSecurityContext(), new MapPropertiesDelegate(), resourceConfig); diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java index 086885c7601..154357803c1 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java @@ -503,19 +503,19 @@ private void addApplication(JaxRsCdiExtension jaxRs, JaxRsApplication applicatio HttpRouting.Builder routing = routingBuilder(namedRouting, routingNameRequired, applicationMeta.appName()); - JaxRsHandler jerseySupport = jaxRs.toJerseySupport(applicationMeta, injectionManager); + JaxRsService jerseyHandler = jaxRs.toJerseySupport(applicationMeta, injectionManager); if (contextRoot.isPresent()) { String contextRootString = contextRoot.get(); LOGGER.fine(() -> "JAX-RS application " + applicationMeta.appName() + " registered on '" + contextRootString + "'"); if (contextRootString.endsWith("/")) { - routing.any(contextRootString + "*", jerseySupport); + routing.register(contextRootString.substring(0, contextRootString.length() - 1), jerseyHandler); } else { - routing.any(contextRootString + "/*", jerseySupport); + routing.register(contextRootString, jerseyHandler); } } else { LOGGER.fine(() -> "JAX-RS application " + applicationMeta.appName() + " registered on '/'"); - routing.any("/*", jerseySupport); + routing.register(jerseyHandler); } } diff --git a/microprofile/server/src/main/java/module-info.java b/microprofile/server/src/main/java/module-info.java index 9e7feb7664f..c634a0b0f97 100644 --- a/microprofile/server/src/main/java/module-info.java +++ b/microprofile/server/src/main/java/module-info.java @@ -53,6 +53,6 @@ provides InjectionManagerFactory with io.helidon.microprofile.server.HelidonHK2InjectionManagerFactory; - // needed when running with modules - to make private methods accessible - opens io.helidon.microprofile.server to weld.core.impl, org.glassfish.hk2.utilities, io.helidon.microprofile.cdi; + // needed when running with modules - to make private methods and types accessible + opens io.helidon.microprofile.server; } diff --git a/microprofile/server/src/test/java/io/helidon/microprofile/server/JerseyPropertiesTest.java b/microprofile/server/src/test/java/io/helidon/microprofile/server/JerseyPropertiesTest.java index 35d7175a58c..963b49a78d2 100644 --- a/microprofile/server/src/test/java/io/helidon/microprofile/server/JerseyPropertiesTest.java +++ b/microprofile/server/src/test/java/io/helidon/microprofile/server/JerseyPropertiesTest.java @@ -32,7 +32,7 @@ /** * Test that it is possible to override {@code IGNORE_EXCEPTION_RESPONSE} in - * Jersey using config. See {@link io.helidon.microprofile.server.JaxRsHandler} + * Jersey using config. See {@link JaxRsService} * for more information. */ @HelidonTest @@ -45,7 +45,7 @@ class JerseyPropertiesTest { @Test void testIgnoreExceptionResponseOverride() { - JaxRsHandler jerseySupport = JaxRsHandler.create(new ResourceConfig().property(IGNORE_EXCEPTION_RESPONSE, "false"), + JaxRsService jerseySupport = JaxRsService.create(new ResourceConfig().property(IGNORE_EXCEPTION_RESPONSE, "false"), null); assertNotNull(jerseySupport); assertThat(System.getProperty(IGNORE_EXCEPTION_RESPONSE), is("false")); diff --git a/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingContextFilter.java b/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingContextFilter.java index 9d1848673ec..b3afaa669f4 100644 --- a/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingContextFilter.java +++ b/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingContextFilter.java @@ -48,11 +48,19 @@ @Priority(Integer.MIN_VALUE) @ApplicationScoped public class MpTracingContextFilter implements ContainerRequestFilter { - @Context - private Provider request; + private final Provider request; private final Config config = ConfigProvider.getConfig(); + /** + * Constructor to be used by JAX-RS implementation. + * + * @param request injected by JAX-RS + */ + public MpTracingContextFilter(@Context Provider request) { + this.request = request; + } + @Override public void filter(ContainerRequestContext requestContext) { ServerRequest serverRequest = this.request.get(); diff --git a/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingFilter.java b/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingFilter.java index 9f905713e2c..1644c1da3af 100644 --- a/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingFilter.java +++ b/microprofile/tracing/src/main/java/io/helidon/microprofile/tracing/MpTracingFilter.java @@ -46,12 +46,20 @@ public class MpTracingFilter extends AbstractTracingFilter { private static final Pattern LOCALHOST_PATTERN = Pattern.compile("127.0.0.1", Pattern.LITERAL); - @Context - private ResourceInfo resourceInfo; + private final ResourceInfo resourceInfo; private MpTracingHelper utils; private Function skipPatternFunction; + /** + * Create a new instance by JAX-RS. + * + * @param resourceInfo injected by JAX-RS implementation + */ + public MpTracingFilter(@Context ResourceInfo resourceInfo) { + this.resourceInfo = resourceInfo; + } + /** * Post construct method, initialization procedures. */ diff --git a/microprofile/tracing/src/main/java/module-info.java b/microprofile/tracing/src/main/java/module-info.java index 5f979ea4a09..1ffdaec060a 100644 --- a/microprofile/tracing/src/main/java/module-info.java +++ b/microprofile/tracing/src/main/java/module-info.java @@ -48,8 +48,8 @@ exports io.helidon.microprofile.tracing; - // this is needed for CDI extensions that use non-public observer methods - opens io.helidon.microprofile.tracing to weld.core.impl,org.glassfish.hk2.utilities, io.helidon.microprofile.cdi; + // this is needed for CDI extensions that use non-public observer methods, and for constructor injection + opens io.helidon.microprofile.tracing; provides jakarta.enterprise.inject.spi.Extension with io.helidon.microprofile.tracing.TracingCdiExtension; diff --git a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilter.java b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilter.java index fba6a7e9f41..efb7f272145 100644 --- a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilter.java +++ b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilter.java @@ -116,18 +116,29 @@ private Map subResourceMethodSecurity(Class appCl return appClassCacheEntry(appClass).subResourceMethodSecurity; } - @Context - private ServerConfig serverConfig; + private final ServerConfig serverConfig; - @Context - private SecurityContext securityContext; + private final SecurityContext securityContext; private final List analyzers = new LinkedList<>(); /** - * Default constructor to be used by Jersey when creating an instance of this class. + * Constructor to be used by Jersey when creating an instance, injects all parameters. + * + * @param security security instance + * @param featureConfig feature config + * @param serverConfig server config + * @param securityContext security context */ - public SecurityFilter() { + public SecurityFilter(@Context Security security, + @Context FeatureConfig featureConfig, + @Context ServerConfig serverConfig, + @Context SecurityContext securityContext) { + super(security, featureConfig); + + this.serverConfig = serverConfig; + this.securityContext = securityContext; + loadAnalyzers(); } diff --git a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilterCommon.java b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilterCommon.java index f42f9873dd1..80f84a0c558 100644 --- a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilterCommon.java +++ b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityFilterCommon.java @@ -52,18 +52,13 @@ abstract class SecurityFilterCommon { private static final List RESPONSE_MAPPERS = HelidonServiceLoader .builder(ServiceLoader.load(SecurityResponseMapper.class)).build().asList(); - @Context - private Security security; + private final Security security; - @Context - private FeatureConfig featureConfig; - - SecurityFilterCommon() { - } + private final FeatureConfig featureConfig; // due to a bug in Jersey @Context in constructor injection is failing // this method is needed for unit tests - SecurityFilterCommon(Security security, FeatureConfig featureConfig) { + SecurityFilterCommon(@Context Security security, @Context FeatureConfig featureConfig) { this.security = security; this.featureConfig = featureConfig; } diff --git a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityPreMatchingFilter.java b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityPreMatchingFilter.java index 532b7772eb5..c2361ad10fa 100644 --- a/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityPreMatchingFilter.java +++ b/security/integration/jersey/src/main/java/io/helidon/security/integration/jersey/SecurityPreMatchingFilter.java @@ -20,6 +20,7 @@ import java.util.logging.Logger; import io.helidon.common.context.Contexts; +import io.helidon.security.Security; import io.helidon.security.SecurityContext; import io.helidon.security.integration.common.SecurityTracing; @@ -47,11 +48,18 @@ class SecurityPreMatchingFilter extends SecurityFilterCommon implements Containe private static final AtomicInteger CONTEXT_COUNTER = new AtomicInteger(); - @Context - private InjectionManager injectionManager; + private final InjectionManager injectionManager; + private final UriInfo uriInfo; - @Context - private UriInfo uriInfo; + SecurityPreMatchingFilter(@Context Security security, + @Context FeatureConfig featureConfig, + @Context InjectionManager injectionManager, + @Context UriInfo uriInfo) { + super(security, featureConfig); + + this.injectionManager = injectionManager; + this.uriInfo = uriInfo; + } @Override public void filter(ContainerRequestContext request) { diff --git a/security/integration/jersey/src/main/java/module-info.java b/security/integration/jersey/src/main/java/module-info.java index 0dcd21f5ead..a45b0d4b917 100644 --- a/security/integration/jersey/src/main/java/module-info.java +++ b/security/integration/jersey/src/main/java/module-info.java @@ -38,11 +38,8 @@ exports io.helidon.security.integration.jersey; - // needed for jersey injection - opens io.helidon.security.integration.jersey to org.glassfish.hk2.utilities, - org.glassfish.hk2.locator, - weld.core.impl, - io.helidon.microprofile.cdi; + // needed for injection (uses constructor injection) + opens io.helidon.security.integration.jersey; uses io.helidon.security.providers.common.spi.AnnotationAnalyzer; uses io.helidon.security.integration.jersey.SecurityResponseMapper; diff --git a/security/integration/jersey/src/test/java/io/helidon/security/integration/jersey/TestAnnotAnalyzers.java b/security/integration/jersey/src/test/java/io/helidon/security/integration/jersey/TestAnnotAnalyzers.java index 06eb1f2216b..7075c6dba8c 100644 --- a/security/integration/jersey/src/test/java/io/helidon/security/integration/jersey/TestAnnotAnalyzers.java +++ b/security/integration/jersey/src/test/java/io/helidon/security/integration/jersey/TestAnnotAnalyzers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2022 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. @@ -31,7 +31,7 @@ class TestAnnotAnalyzers { @Test void testAnalyzerOrder() { - SecurityFilter filter = new SecurityFilter(); + SecurityFilter filter = new SecurityFilter((FeatureConfig) null, null, null, null); List analyzers = filter.analyzers(); assertThat(analyzers, hasSize(2)); diff --git a/tests/integration/native-image/mp-1/logging.properties b/tests/integration/native-image/mp-1/logging.properties index c22104f42af..7fbe86fdd4a 100644 --- a/tests/integration/native-image/mp-1/logging.properties +++ b/tests/integration/native-image/mp-1/logging.properties @@ -34,12 +34,11 @@ io.helidon.level=INFO io.helidon.logging.jul.HelidonConsoleHandler.level=ALL java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n AUDIT.level=FINEST -io.helidon.reactive.webserver.level=WARNING -io.helidon.reactive.webserver.accesslog.AccessLogHandler.level=FINEST -io.helidon.reactive.webserver.accesslog.AccessLogHandler.pattern=access.log -io.helidon.reactive.webserver.accesslog.AccessLogHandler.append=true +io.helidon.nima.webserver.accesslog.AccessLogHandler.level=FINEST +io.helidon.nima.webserver.accesslog.AccessLogHandler.pattern=access.log +io.helidon.nima.webserver.accesslog.AccessLogHandler.append=true -io.helidon.reactive.webserver.AccessLog.level=INFO -io.helidon.reactive.webserver.AccessLog.useParentHandlers=false -io.helidon.reactive.webserver.AccessLog.handlers=io.helidon.reactive.webserver.accesslog.AccessLogHandler +io.helidon.nima.webserver.AccessLog.level=INFO +io.helidon.nima.webserver.AccessLog.useParentHandlers=false +io.helidon.nima.webserver.AccessLog.handlers=io.helidon.nima.webserver.accesslog.AccessLogHandler diff --git a/tests/integration/native-image/mp-1/src/main/java/module-info.java b/tests/integration/native-image/mp-1/src/main/java/module-info.java index a9c4a0010d8..d3853a8036f 100644 --- a/tests/integration/native-image/mp-1/src/main/java/module-info.java +++ b/tests/integration/native-image/mp-1/src/main/java/module-info.java @@ -46,10 +46,8 @@ exports io.helidon.tests.integration.nativeimage.mp1.other; // opens is needed to inject private fields, create classes in the same package (proxy) - opens io.helidon.tests.integration.nativeimage.mp1 to weld.core.impl, io.helidon.microprofile.cdi, - org.glassfish.hk2.utilities; - opens io.helidon.tests.integration.nativeimage.mp1.other to weld.core.impl, io.helidon.microprofile.cdi, - org.glassfish.hk2.utilities; + opens io.helidon.tests.integration.nativeimage.mp1; + opens io.helidon.tests.integration.nativeimage.mp1.other; // we need to open the static resource on classpath directory to everybody, as otherwise // static content will not see it