Updated CDI, BV, and EL. Signed-off-by: jansupol <jan.supol@oracle.com>
diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml index 9083238..8173ba3 100644 --- a/containers/grizzly2-http/pom.xml +++ b/containers/grizzly2-http/pom.xml
@@ -107,6 +107,15 @@ <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <inherited>true</inherited> + <configuration> + <instructions> + <Import-Package> + org.glassfish.grizzly.*;version="[3.0,5.0)", + * + </Import-Package> + </instructions> + <unpackBundle>true</unpackBundle> + </configuration> </plugin> <plugin> @@ -162,33 +171,5 @@ </pluginManagement> </build> </profile> - <profile> - <id>jdk8</id> - <activation> - <jdk>1.8</jdk> - </activation> - <build> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>default-testCompile</id> - <configuration> - <!-- - Jetty client is not compatible with JDK8, older versions need different setup - JDK HTTP client is not in JDK8 at all - Jersey Client doesn't support HTTP/2 (at least not directly) - --> - <skip>true</skip> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </pluginManagement> - </build> - </profile> </profiles> </project>
diff --git a/containers/grizzly2-servlet/pom.xml b/containers/grizzly2-servlet/pom.xml index 02fe0f2..f44f63c 100644 --- a/containers/grizzly2-servlet/pom.xml +++ b/containers/grizzly2-servlet/pom.xml
@@ -71,6 +71,7 @@ <instructions> <Import-Package> jakarta.servlet.*;version="[5.0,7.0)", + org.glassfish.grizzly.*;version="[3.0,5.0)", * </Import-Package> </instructions>
diff --git a/examples/cdi-webapp/src/main/resources/META-INF/beans.xml b/examples/cdi-webapp/src/main/resources/META-INF/beans.xml index 5d361e9..77e336a 100644 --- a/examples/cdi-webapp/src/main/resources/META-INF/beans.xml +++ b/examples/cdi-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Distribution License v. 1.0, which is available at @@ -11,4 +11,9 @@ --> -<beans/> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans>
diff --git a/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml b/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml index 5d361e9..77e336a 100644 --- a/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml +++ b/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Distribution License v. 1.0, which is available at @@ -11,4 +11,9 @@ --> -<beans/> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans>
diff --git a/examples/helloworld-weld/src/main/resources/META-INF/beans.xml b/examples/helloworld-weld/src/main/resources/META-INF/beans.xml index 5d361e9..77e336a 100644 --- a/examples/helloworld-weld/src/main/resources/META-INF/beans.xml +++ b/examples/helloworld-weld/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Distribution License v. 1.0, which is available at @@ -11,4 +11,9 @@ --> -<beans/> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans>
diff --git a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java index 3a17677..ce367f5 100644 --- a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java +++ b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java
@@ -124,7 +124,7 @@ return false; } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java index 6cced30..875f63c 100644 --- a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java +++ b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java
@@ -155,7 +155,7 @@ return false; } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java index 2cbc60f..63a3eac 100644 --- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java +++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -823,7 +823,7 @@ return Collections.emptySet(); } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return true; }
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java index 48bc397..d583419 100644 --- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java +++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -123,7 +123,7 @@ return Collections.emptySet(); } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java index c5c4cfe..b653b54 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java
@@ -157,7 +157,8 @@ Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass(); AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass); - InjectionTarget<Supplier<T>> injectionTarget = beanManager.createInjectionTarget(annotatedType); + final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null); SupplierClassBean<T> supplierBean = new SupplierClassBean<>(runtimeType, binding); InjectionTarget<Supplier<T>> jit = getJerseyInjectionTarget(supplierClass, injectionTarget, supplierBean, resolvers); @@ -218,7 +219,8 @@ final Class<Supplier<T>> bindingClass = (Class<Supplier<T>>) binding.getSupplierClass(); final AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(bindingClass); - final InjectionTarget<Supplier<T>> injectionTarget = beanManager.createInjectionTarget(annotatedType); + final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null); final CachedConstructorAnalyzer<Supplier<T>> analyzer = new CachedConstructorAnalyzer<>(bindingClass, InjectionUtils.getInjectAnnotations(resolvers)); @@ -239,7 +241,8 @@ final Class<T> bindingClass = binding.getImplementationType(); final AnnotatedType<T> annotatedType = beanManager.createAnnotatedType(bindingClass); - final InjectionTarget<T> injectionTarget = beanManager.createInjectionTarget(annotatedType); + final InjectionTargetFactory<T> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + final InjectionTarget<T> injectionTarget = injectionTargetFactory.createInjectionTarget(null); final CachedConstructorAnalyzer<T> analyzer = new CachedConstructorAnalyzer<>(bindingClass, InjectionUtils.getInjectAnnotations(resolvers));
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java index 2f4da94..a56f23b 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -142,7 +142,7 @@ return false; } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java index eff570f..7dd99c8 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java
@@ -54,7 +54,7 @@ this.injectionTarget = injectionTargetFactory.createInjectionTarget(null); } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java index 4bf816f..86e97ab 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java
@@ -54,7 +54,7 @@ this.injectionTarget = injectionTargetFactory.createInjectionTarget(null); } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java index 2ae0ebc..584193f 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java
@@ -147,9 +147,10 @@ public static <T> void registerSupplier(SupplierClassBinding<T> binding, AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, BeanManager beanManager) { - Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass(); - AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass); - InjectionTarget<Supplier<T>> injectionTarget = beanManager.createInjectionTarget(annotatedType); + final Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass(); + final AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass); + final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null); SupplierClassBean<T> supplierBean = new SupplierClassBean<>(binding); InjectionTarget<Supplier<T>> jit = getJerseyInjectionTarget(supplierClass, injectionTarget, supplierBean, resolvers);
diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java index 9b94750..c6bd602 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -133,7 +133,7 @@ return false; } - @Override + // @Override - Removed in CDI 4 public boolean isNullable() { return false; }
diff --git a/pom.xml b/pom.xml index 426ec8a..dc41f0b 100644 --- a/pom.xml +++ b/pom.xml
@@ -2157,8 +2157,8 @@ <surefire.version>3.0.0-M5</surefire.version> <!-- Jakartified, eligible for CQ --> - <weld.version>4.0.2.Final</weld.version> - <validation.impl.version>7.0.1.Final</validation.impl.version> + <weld.version>5.0.0.CR2</weld.version> + <validation.impl.version>8.0.0.Alpha1</validation.impl.version> <!-- END of Jakartified, eligible for CQ --> <xerces.version>2.11.0</xerces.version> @@ -2168,7 +2168,7 @@ <!-- do not need CQs (below this line till the end of version properties)--> <gf.impl.version>7.0.0-M2</gf.impl.version> <!-- Jakartified --> - <cdi.api.version>3.0.0</cdi.api.version> + <cdi.api.version>4.0.0</cdi.api.version> <ejb.version>4.0.0</ejb.version> <grizzly2.version>4.0.0-M1</grizzly2.version> <grizzly.npn.version>2.0.0</grizzly.npn.version> @@ -2182,8 +2182,8 @@ <istack.commons.runtime.version>4.0.0</istack.commons.runtime.version> <jakarta.activation-api.version>2.1.0</jakarta.activation-api.version> <jakarta.activation.version>2.0.1</jakarta.activation.version> - <jakarta.el.version>4.0.0</jakarta.el.version> - <jakarta.el.impl.version>4.0.2</jakarta.el.impl.version> + <jakarta.el.version>5.0.0</jakarta.el.version> + <jakarta.el.impl.version>5.0.0-M1</jakarta.el.impl.version> <jakarta.annotation.osgi.version>jakarta.annotation.*;version="[2.0,3)"</jakarta.annotation.osgi.version> <jakarta.annotation.version>2.1.0</jakarta.annotation.version> <jakarta.inject.version>2.0.1</jakarta.inject.version>
diff --git a/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml b/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml index ae84224..c2146b4 100644 --- a/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml +++ b/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -17,7 +17,11 @@ --> -<beans> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> <interceptors> <class>org.glassfish.jersey.tests.e2e.inject.cdi.se.SecurityInterceptor</class> </interceptors>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml index 14ea61e..8d3e4b2 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -17,4 +17,9 @@ --> -<beans/> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml index 14ea61e..8d3e4b2 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -17,4 +17,9 @@ --> -<beans/> +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans>
diff --git a/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml b/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml index d773c46..d6b4b48 100644 --- a/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml +++ b/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -17,4 +17,9 @@ --> -<beans/> \ No newline at end of file +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" + bean-discovery-mode="all"> +</beans> \ No newline at end of file