Skip to content

Commit bf4d9f4

Browse files
jansupolsenivam
authored andcommitted
Updated CDI, BV, and EL.
Signed-off-by: jansupol <jan.supol@oracle.com>
1 parent bdf758c commit bf4d9f4

File tree

20 files changed

+85
-65
lines changed

20 files changed

+85
-65
lines changed

containers/grizzly2-http/pom.xml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@
107107
<groupId>org.apache.felix</groupId>
108108
<artifactId>maven-bundle-plugin</artifactId>
109109
<inherited>true</inherited>
110+
<configuration>
111+
<instructions>
112+
<Import-Package>
113+
org.glassfish.grizzly.*;version="[3.0,5.0)",
114+
*
115+
</Import-Package>
116+
</instructions>
117+
<unpackBundle>true</unpackBundle>
118+
</configuration>
110119
</plugin>
111120

112121
<plugin>
@@ -162,33 +171,5 @@
162171
</pluginManagement>
163172
</build>
164173
</profile>
165-
<profile>
166-
<id>jdk8</id>
167-
<activation>
168-
<jdk>1.8</jdk>
169-
</activation>
170-
<build>
171-
<pluginManagement>
172-
<plugins>
173-
<plugin>
174-
<artifactId>maven-compiler-plugin</artifactId>
175-
<executions>
176-
<execution>
177-
<id>default-testCompile</id>
178-
<configuration>
179-
<!--
180-
Jetty client is not compatible with JDK8, older versions need different setup
181-
JDK HTTP client is not in JDK8 at all
182-
Jersey Client doesn't support HTTP/2 (at least not directly)
183-
-->
184-
<skip>true</skip>
185-
</configuration>
186-
</execution>
187-
</executions>
188-
</plugin>
189-
</plugins>
190-
</pluginManagement>
191-
</build>
192-
</profile>
193174
</profiles>
194175
</project>

containers/grizzly2-servlet/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<instructions>
7272
<Import-Package>
7373
jakarta.servlet.*;version="[5.0,7.0)",
74+
org.glassfish.grizzly.*;version="[3.0,5.0)",
7475
*
7576
</Import-Package>
7677
</instructions>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -11,4 +11,9 @@
1111
1212
-->
1313

14-
<beans/>
14+
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
16+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
17+
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
18+
bean-discovery-mode="all">
19+
</beans>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -11,4 +11,9 @@
1111
1212
-->
1313

14-
<beans/>
14+
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
16+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
17+
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
18+
bean-discovery-mode="all">
19+
</beans>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -11,4 +11,9 @@
1111
1212
-->
1313

14-
<beans/>
14+
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
16+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
17+
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
18+
bean-discovery-mode="all">
19+
</beans>

ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public boolean isAlternative() {
124124
return false;
125125
}
126126

127-
@Override
127+
// @Override - Removed in CDI 4
128128
public boolean isNullable() {
129129
return false;
130130
}

ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public boolean isAlternative() {
155155
return false;
156156
}
157157

158-
@Override
158+
// @Override - Removed in CDI 4
159159
public boolean isNullable() {
160160
return false;
161161
}

ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
44
*
55
* This program and the accompanying materials are made available under the
@@ -823,7 +823,7 @@ public Set getInjectionPoints() {
823823
return Collections.emptySet();
824824
}
825825

826-
@Override
826+
// @Override - Removed in CDI 4
827827
public boolean isNullable() {
828828
return true;
829829
}

ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -123,7 +123,7 @@ public Set<InjectionPoint> getInjectionPoints() {
123123
return Collections.emptySet();
124124
}
125125

126-
@Override
126+
// @Override - Removed in CDI 4
127127
public boolean isNullable() {
128128
return false;
129129
}

incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ public static <T> BindingBeanPair registerSupplier(RuntimeType runtimeType, Supp
157157

158158
Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass();
159159
AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass);
160-
InjectionTarget<Supplier<T>> injectionTarget = beanManager.createInjectionTarget(annotatedType);
160+
final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType);
161+
final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null);
161162

162163
SupplierClassBean<T> supplierBean = new SupplierClassBean<>(runtimeType, binding);
163164
InjectionTarget<Supplier<T>> jit = getJerseyInjectionTarget(supplierClass, injectionTarget, supplierBean, resolvers);
@@ -218,7 +219,8 @@ private static <T> ConstructorInjectionPoint<T> createConstructorInjectionPoint(
218219

219220
final Class<Supplier<T>> bindingClass = (Class<Supplier<T>>) binding.getSupplierClass();
220221
final AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(bindingClass);
221-
final InjectionTarget<Supplier<T>> injectionTarget = beanManager.createInjectionTarget(annotatedType);
222+
final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType);
223+
final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null);
222224

223225
final CachedConstructorAnalyzer<Supplier<T>> analyzer =
224226
new CachedConstructorAnalyzer<>(bindingClass, InjectionUtils.getInjectAnnotations(resolvers));
@@ -239,7 +241,8 @@ private static <T> ConstructorInjectionPoint<T> createConstructorInjectionPoint(
239241

240242
final Class<T> bindingClass = binding.getImplementationType();
241243
final AnnotatedType<T> annotatedType = beanManager.createAnnotatedType(bindingClass);
242-
final InjectionTarget<T> injectionTarget = beanManager.createInjectionTarget(annotatedType);
244+
final InjectionTargetFactory<T> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType);
245+
final InjectionTarget<T> injectionTarget = injectionTargetFactory.createInjectionTarget(null);
243246

244247
final CachedConstructorAnalyzer<T> analyzer =
245248
new CachedConstructorAnalyzer<>(bindingClass, InjectionUtils.getInjectAnnotations(resolvers));

0 commit comments

Comments
 (0)