Skip to content

Commit eb373ce

Browse files
committed
Merge remote-tracking branch 'origin/2.x' into 'origin/3.0'
Signed-off-by: Maxim Nesen <[email protected]>
2 parents 3ff0577 + 7ea3893 commit eb373ce

File tree

33 files changed

+9613
-85
lines changed

33 files changed

+9613
-85
lines changed

NOTICE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ KineticJS, v4.7.1
9595
* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS
9696
* Copyright: Eric Rowell
9797

98-
org.objectweb.asm Version 9.8
98+
org.objectweb.asm Version 9.9
9999
* License: Modified BSD (https://asm.ow2.io/license.html)
100100
* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.
101101

bom/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@
158158
<artifactId>jersey-bean-validation</artifactId>
159159
<version>${project.version}</version>
160160
</dependency>
161+
<dependency>
162+
<groupId>org.glassfish.jersey.ext</groupId>
163+
<artifactId>jersey-constants</artifactId>
164+
<version>${project.version}</version>
165+
</dependency>
161166
<dependency>
162167
<groupId>org.glassfish.jersey.ext</groupId>
163168
<artifactId>jersey-entity-filtering</artifactId>

connectors/helidon-connector/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@
7676
<artifactId>maven-compiler-plugin</artifactId>
7777
<inherited>false</inherited>
7878
</plugin>
79-
<plugin>
80-
<groupId>org.apache.maven.plugins</groupId>
81-
<artifactId>maven-javadoc-plugin</artifactId>
82-
<configuration>
83-
<source>8</source>
84-
</configuration>
85-
</plugin>
8679
</plugins>
8780
</build>
8881

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

Lines changed: 6 additions & 6 deletions
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, 2025 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
@@ -40,18 +40,18 @@
4040
* would be created, this class is utilized.
4141
*/
4242
/* package */ class InvocationBuilderListenerStage {
43-
final Iterator<InvocationBuilderListener> invocationBuilderListenerIterator;
43+
private final Iterable<InvocationBuilderListener> invocationBuilderListenerIterable;
4444

4545
/* package */ InvocationBuilderListenerStage(InjectionManager injectionManager) {
4646
final RankedComparator<InvocationBuilderListener> comparator =
4747
new RankedComparator<>(RankedComparator.Order.ASCENDING);
48-
invocationBuilderListenerIterator = Providers
49-
.getAllProviders(injectionManager, InvocationBuilderListener.class, comparator).iterator();
48+
invocationBuilderListenerIterable = Providers
49+
.getAllProviders(injectionManager, InvocationBuilderListener.class, comparator);
5050
}
5151

5252
/* package */ void invokeListener(JerseyInvocation.Builder builder) {
53-
while (invocationBuilderListenerIterator.hasNext()) {
54-
invocationBuilderListenerIterator.next().onNewBuilder(new InvocationBuilderContextImpl(builder));
53+
for (InvocationBuilderListener invocationBuilderListener : invocationBuilderListenerIterable) {
54+
invocationBuilderListener.onNewBuilder(new InvocationBuilderContextImpl(builder));
5555
}
5656
}
5757

core-client/src/test/java/org/glassfish/jersey/client/spi/InvocationBuilderListenerTest.java

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025 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
@@ -16,22 +16,17 @@
1616

1717
package org.glassfish.jersey.client.spi;
1818

19-
import org.glassfish.jersey.internal.PropertiesDelegate;
2019
import org.hamcrest.Matchers;
2120
import org.hamcrest.MatcherAssert;
2221
import org.junit.jupiter.api.Assertions;
2322
import org.junit.jupiter.api.BeforeEach;
2423
import org.junit.jupiter.api.Test;
2524

26-
import jakarta.annotation.Priority;
2725
import jakarta.ws.rs.client.ClientBuilder;
2826
import jakarta.ws.rs.client.ClientRequestContext;
2927
import jakarta.ws.rs.client.ClientRequestFilter;
30-
import jakarta.ws.rs.client.Entity;
3128
import jakarta.ws.rs.client.WebTarget;
3229
import jakarta.ws.rs.core.CacheControl;
33-
import jakarta.ws.rs.core.Configuration;
34-
import jakarta.ws.rs.core.Context;
3530
import jakarta.ws.rs.core.HttpHeaders;
3631
import jakarta.ws.rs.core.MediaType;
3732
import jakarta.ws.rs.core.Response;
@@ -95,6 +90,20 @@ public void testGetters() {
9590
}
9691
}
9792

93+
@Test
94+
public void testCounter() {
95+
CountingInvocationBuilderListener listener = new CountingInvocationBuilderListener();
96+
target = target.register(listener);
97+
try (Response r = target.request().get()) {
98+
assertDefault(r);
99+
Assertions.assertEquals(1, listener.getCount());
100+
}
101+
try (Response r = target.request().get()) {
102+
assertDefault(r);
103+
Assertions.assertEquals(2, listener.getCount());
104+
}
105+
}
106+
98107
private void assertDefault(Response response) {
99108
Assertions.assertEquals(key(ONE) + "=" + ONE, response.readEntity(String.class));
100109
}
@@ -193,4 +202,17 @@ public void onNewBuilder(InvocationBuilderContext context) {
193202
MatcherAssert.assertThat(context.getCookies().get("Cookie"), Matchers.notNullValue());
194203
}
195204
}
205+
206+
private static class CountingInvocationBuilderListener implements InvocationBuilderListener {
207+
private int counter = 0;
208+
209+
@Override
210+
public void onNewBuilder(InvocationBuilderContext context) {
211+
counter++;
212+
}
213+
214+
public int getCount() {
215+
return counter;
216+
}
217+
}
196218
}

core-common/src/main/java/org/glassfish/jersey/internal/guava/Ordering.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ <E extends T> E min(Iterable<E> iterable) {
203203
* @throws ClassCastException if the parameters are not <i>mutually
204204
* comparable</i> under this ordering.
205205
*/
206-
<E extends T> E min(E a, E b) {
206+
public <E extends T> E min(E a, E b) {
207207
return (compare(a, b) <= 0) ? a : b;
208208
}
209209

@@ -278,7 +278,7 @@ <E extends T> E max(Iterable<E> iterable) {
278278
* @throws ClassCastException if the parameters are not <i>mutually
279279
* comparable</i> under this ordering.
280280
*/
281-
<E extends T> E max(E a, E b) {
281+
public <E extends T> E max(E a, E b) {
282282
return (compare(a, b) >= 0) ? a : b;
283283
}
284284

core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public ClassReader(
195195
this.b = classFileBuffer;
196196
// Check the class' major_version. This field is after the magic and minor_version fields, which
197197
// use 4 and 2 bytes respectively.
198-
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V25) {
198+
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V26) {
199199
throw new IllegalArgumentException(
200200
"Unsupported class file major version " + readShort(classFileOffset + 6));
201201
}

core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ public interface Opcodes {
291291
int V23 = 0 << 16 | 67;
292292
int V24 = 0 << 16 | 68;
293293
int V25 = 0 << 16 | 69;
294+
int V26 = 0 << 16 | 70;
294295

295296
/**
296297
* Version flag indicating that the class is using 'preview' features.

core-server/src/main/java/jersey/repackaged/org/objectweb/asm/SymbolTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ private static final class LabelEntry {
14731473

14741474
/**
14751475
* Another entry (and so on recursively) having the same hash code (modulo the size of {@link
1476-
* SymbolTable#labelEntries}}) as this one.
1476+
* SymbolTable#labelEntries}) as this one.
14771477
*/
14781478
LabelEntry next;
14791479

core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/AnnotationAcceptingListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ private Class getClassForName(final String className) {
309309

310310
private static class ClassReaderWrapper {
311311
private static final Logger LOGGER = Logger.getLogger(ClassReader.class.getName());
312-
private static final int WARN_VERSION = Opcodes.V25;
312+
private static final int WARN_VERSION = Opcodes.V26;
313313
private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096;
314314

315315
private final byte[] b;

0 commit comments

Comments
 (0)