Skip to content

Commit ee8e31a

Browse files
authored
Comply with 4.0 API (#5550)
* Comply with 4.0 API Signed-off-by: jansupol <jan.supol@oracle.com>
1 parent 51ed892 commit ee8e31a

File tree

53 files changed

+260
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+260
-90
lines changed

NOTICE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ aopalliance Version 1
4141
* Project: http://aopalliance.sourceforge.net
4242
* Copyright: Material in the public domain is not protected by copyright
4343

44-
Bean Validation API 3.0.2
44+
Bean Validation API 3.1.0-M1
4545
* License: Apache License, 2.0
4646
* Project: https://projects.eclipse.org/projects/ee4j.bean-validation
4747
* Copyright: 2009, Red Hat, Inc. and/or its affiliates, and individual contributors

bundles/jaxrs-ri/pom.xml

Lines changed: 4 additions & 5 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) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2012, 2024 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 Public License v. 2.0, which is available at
@@ -277,9 +277,9 @@
277277
jersey.repackaged.org.objectweb.asm.*;version=${project.version}
278278
</Export-Package>
279279
<Import-Package><![CDATA[
280-
jakarta.servlet.annotation.*;resolution:=optional;version="[5.0,7.0)",
281-
jakarta.servlet.descriptor.*;resolution:=optional;version="[5.0,7.0)",
282-
jakarta.servlet.*;version="[5.0,7.0)",
280+
jakarta.servlet.annotation.*;resolution:=optional;version="[6.0,7.0)",
281+
jakarta.servlet.descriptor.*;resolution:=optional;version="[6.0,7.0)",
282+
jakarta.servlet.*;version="[6.0,7.0)",
283283
${jakarta.annotation.osgi.version},
284284
jakarta.persistence.*;resolution:=optional,
285285
jakarta.validation.*;resolution:=optional;version="[3,4)",
@@ -314,7 +314,6 @@
314314
<plugin>
315315
<groupId>org.apache.maven.plugins</groupId>
316316
<artifactId>maven-shade-plugin</artifactId>
317-
<version>3.2.4</version>
318317
<executions>
319318
<execution>
320319
<phase>package</phase>

connectors/helidon-connector/src/test/java/org/glassfish/jersey/helidon/connector/sse/SseTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024 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
@@ -53,7 +53,7 @@ public class SseTest extends JerseyTest {
5353
public static class SimpleSseResource {
5454
@GET
5555
@Produces(MediaType.SERVER_SENT_EVENTS)
56-
public void send(@Context SseEventSink sink, @Context Sse sse) {
56+
public void send(@Context SseEventSink sink, @Context Sse sse) throws Exception {
5757
try (SseEventSink s = sink) {
5858
for (int i = 0; i != 10; i++) {
5959
s.send(sse.newEvent("A"));

containers/grizzly2-http/pom.xml

Lines changed: 2 additions & 1 deletion
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) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2011, 2024 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 Public License v. 2.0, which is available at
@@ -111,6 +111,7 @@
111111
<instructions>
112112
<Import-Package>
113113
org.glassfish.grizzly.*;version="[3.0,5.0)",
114+
${jakarta.rest.osgi.version},
114115
*
115116
</Import-Package>
116117
</instructions>

containers/grizzly2-servlet/pom.xml

Lines changed: 3 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) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2012, 2024 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 Public License v. 2.0, which is available at
@@ -70,8 +70,9 @@
7070
<configuration>
7171
<instructions>
7272
<Import-Package>
73-
jakarta.servlet.*;version="[5.0,7.0)",
73+
jakarta.servlet.*;version="[6.0,7.0)",
7474
org.glassfish.grizzly.*;version="[3.0,5.0)",
75+
${jakarta.rest.osgi.version},
7576
*
7677
</Import-Package>
7778
</instructions>

containers/jersey-servlet-core/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@
7373
<!-- Note: When you're changing these properties change them also in bundles/jax-rs-ri/bundle/pom.xml. -->
7474
<Import-Package>
7575
jakarta.persistence.*;resolution:=optional,
76-
jakarta.servlet.*;version="[5.0,7.0)",
76+
jakarta.servlet.*;version="[6.0,7.0)",
7777
${jakarta.annotation.osgi.version},
78+
${jakarta.rest.osgi.version},
7879
*
7980
</Import-Package>
8081
<Export-Package>org.glassfish.jersey.servlet.*</Export-Package>

containers/jersey-servlet/pom.xml

Lines changed: 3 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) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2012, 2024 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 Public License v. 2.0, which is available at
@@ -74,8 +74,9 @@
7474
<instructions>
7575
<!-- Note: When you're changing these properties change them also in bundles/jax-rs-ri/bundle/pom.xml. -->
7676
<Import-Package>
77-
jakarta.servlet.*;version="[5.0,7.0)",
77+
jakarta.servlet.*;version="[6.0,7.0)",
7878
${jakarta.annotation.osgi.version},
79+
${jakarta.rest.osgi.version},
7980
*
8081
</Import-Package>
8182
</instructions>

containers/jetty-servlet/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<configuration>
8080
<instructions>
8181
<Import-Package>
82-
jakarta.servlet.*;version="[5.0,7.0)",
82+
jakarta.servlet.*;version="[6.0,7.0)",
8383
${jetty.osgi.version},
8484
*
8585
</Import-Package>

core-client/pom.xml

Lines changed: 2 additions & 1 deletion
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) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2011, 2024 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 Public License v. 2.0, which is available at
@@ -92,6 +92,7 @@
9292
<instructions>
9393
<Import-Package>
9494
${jakarta.annotation.osgi.version},
95+
${jakarta.rest.osgi.version},
9596
*
9697
</Import-Package>
9798
<unpackBundle>true</unpackBundle>

core-client/src/main/java/org/glassfish/jersey/client/InvocationInterceptorStages.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024 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
@@ -53,6 +53,7 @@
5353
import java.util.Map;
5454
import java.util.Optional;
5555
import java.util.Set;
56+
import java.util.function.Predicate;
5657
import java.util.logging.Level;
5758
import java.util.logging.Logger;
5859

@@ -280,6 +281,11 @@ public Collection<String> getPropertyNames() {
280281
return clientRequest.getPropertyNames();
281282
}
282283

284+
// @Override
285+
public boolean hasProperty(String name) {
286+
return clientRequest.hasProperty(name);
287+
}
288+
283289
@Override
284290
public void setProperty(String name, Object object) {
285291
clientRequest.setProperty(name, object);
@@ -325,6 +331,16 @@ public String getHeaderString(String name) {
325331
return clientRequest.getHeaderString(name);
326332
}
327333

334+
// @Override
335+
public boolean containsHeaderString(String name, String valueSeparatorRegex, Predicate<String> valuePredicate) {
336+
return clientRequest.containsHeaderString(name, valueSeparatorRegex, valuePredicate);
337+
}
338+
339+
// @Override
340+
public boolean containsHeaderString(String name, Predicate<String> valuePredicate) {
341+
return clientRequest.containsHeaderString(name, valuePredicate);
342+
}
343+
328344
@Override
329345
public Date getDate() {
330346
return clientRequest.getDate();
@@ -500,6 +516,16 @@ public String getHeaderString(String name) {
500516
return clientResponse.getHeaderString(name);
501517
}
502518

519+
// @Override
520+
public boolean containsHeaderString(String name, String valueSeparatorRegex, Predicate<String> valuePredicate) {
521+
return clientResponse.containsHeaderString(name, valueSeparatorRegex, valuePredicate);
522+
}
523+
524+
// @Override
525+
public boolean containsHeaderString(String name, Predicate<String> valuePredicate) {
526+
return clientResponse.containsHeaderString(name, valuePredicate);
527+
}
528+
503529
@Override
504530
public Set<String> getAllowedMethods() {
505531
return clientResponse.getAllowedMethods();

0 commit comments

Comments
 (0)