[cxf] branch dependabot/maven/org.easymock-easymock-5.2.0 created (now a2f4ffe632)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.easymock-easymock-5.2.0 in repository https://gitbox.apache.org/repos/asf/cxf.git at a2f4ffe632 Bump org.easymock:easymock from 5.1.0 to 5.2.0 No new revisions were added by this update.
[cxf] branch dependabot/maven/cxf.jetty.version-11.0.16 created (now 492c8c9311)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/cxf.jetty.version-11.0.16 in repository https://gitbox.apache.org/repos/asf/cxf.git at 492c8c9311 Bump cxf.jetty.version from 11.0.15 to 11.0.16 No new revisions were added by this update.
[cxf] 02/02: Re-enable checkstyle/pmd on master, fix all the issues so backporting changes is easier
This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git commit 58d8029e6ffdacaab35c46d531aac289002eacdf Author: Daniel Kulp AuthorDate: Wed Aug 30 18:26:55 2023 -0400 Re-enable checkstyle/pmd on master, fix all the issues so backporting changes is easier --- .../main/java/org/apache/cxf/helpers/NSDecl.java | 2 +- .../jaxws/CxfJaxwsAutoConfiguration.java | 2 + .../AbstractObservationClientProvider.java | 4 +- .../micrometer/CxfObservationConventionUtil.java | 11 +++-- .../ObservationClientStartInterceptor.java | 5 ++- .../micrometer/ObservationStartInterceptor.java| 7 ++-- .../jaxrs/AbstractJaxrsObservationConvention.java | 4 +- .../jaxrs/ContainerRequestReceiverContext.java | 3 +- ...tainerRequestReceiverObservationConvention.java | 3 +- .../ContainerRequestSenderObservationContext.java | 3 +- ...ontainerRequestSenderObservationConvention.java | 3 +- ...tainerRequestReceiverObservationConvention.java | 11 ++--- ...ontainerRequestSenderObservationConvention.java | 8 ++-- .../jaxrs/JaxrsObservationDocumentation.java | 9 - .../jaxrs/ObservationClientProvider.java | 16 .../jaxrs/ObservationContextProvider.java | 2 +- .../micrometer/jaxrs/ObservationFeature.java | 6 +-- .../micrometer/jaxrs/ObservationProvider.java | 17 .../micrometer/ObservationIntegrationTest.java | 4 +- .../AbstractOpenTelemetryProvider.java | 2 +- .../opentelemetry/OpenTelemetryFeature.java| 4 +- .../opentelemetry/jaxrs/OpenTelemetryFeature.java | 7 ++-- parent/pom.xml | 47 -- .../cxf/jaxrs/provider/CustomJaxbProvider.java | 2 +- .../http/netty/client/NettyHttpClientRequest.java | 2 +- .../netty/server/NettyHttpDestinationTest.java | 3 +- .../java/org/apache/cxf/ws/rm/RMManagerTest.java | 3 +- .../apache/cxf/sts/claims/LdapClaimsHandler.java | 2 +- .../cxf/sts/claims/LdapGroupClaimsHandler.java | 2 +- .../apache/cxf/sts/claims/StaticClaimsHandler.java | 4 +- .../sts/claims/StaticEndpointClaimsHandler.java| 4 +- .../apache/cxf/sts/claims/mapper/ClaimUtils.java | 4 +- .../org/apache/cxf/sts/event/map/EventMapper.java | 4 +- .../provider/jwt/DefaultJWTClaimsProvider.java | 2 +- .../sts/claims/mapper/JexlClaimsMapperTest.java| 7 ++-- .../cxf/sts/common/CustomAttributeProvider.java| 4 +- .../apache/cxf/systest/sts/rest/STSRESTTest.java | 4 +- .../cdi/base/tomcat/AbstractTomcatServer.java | 2 +- .../org/apache/cxf/systest/jaxrs/BookStore.java| 4 +- .../jaxrs/provider/CXFJaxbElementProvider.java | 2 +- .../systest/dispatch/DispatchClientServerTest.java | 2 +- .../org/apache/cxf/systest/jaxws/CXF7990Test.java | 2 +- .../jaxrs/sse/tomcat/AbstractTomcatServer.java | 2 +- .../systest/type_test/AbstractTypeTestClient2.java | 2 +- .../toolspec/parser/CommandLineParserTest.java | 2 +- .../jaxws/customization/CustomizationParser.java | 20 - 46 files changed, 141 insertions(+), 124 deletions(-) diff --git a/core/src/main/java/org/apache/cxf/helpers/NSDecl.java b/core/src/main/java/org/apache/cxf/helpers/NSDecl.java index ca3d34ee32..f64fdc4a26 100644 --- a/core/src/main/java/org/apache/cxf/helpers/NSDecl.java +++ b/core/src/main/java/org/apache/cxf/helpers/NSDecl.java @@ -31,7 +31,7 @@ public final class NSDecl { this.prefix = pfx.intern(); } this.uri = ur.intern(); -this.hashCode = (toString()).hashCode(); +this.hashCode = toString().hashCode(); } public String getPrefix() { diff --git a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/jaxws/CxfJaxwsAutoConfiguration.java b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/jaxws/CxfJaxwsAutoConfiguration.java index 5f785b0400..c4d41b38e0 100644 --- a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/jaxws/CxfJaxwsAutoConfiguration.java +++ b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/jaxws/CxfJaxwsAutoConfiguration.java @@ -29,6 +29,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.annotation.Configuration; +//CHECKSTYLE:OFF + @Configuration @ConditionalOnClass({ Resource.class, WebServiceContext.class }) public class CxfJaxwsAutoConfiguration { diff --git a/integration/tracing/tracing-micrometer/src/main/java/org/apache/cxf/tracing/micrometer/AbstractObservationClientProvider.java b/integration/tracing/tracing-micrometer/src/main/java/org/apache/cxf/tracing/micrometer/AbstractObservationC
[cxf] 01/02: Add system properly to force use of older URLConnection
This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git commit 3d70de80fb60b74040c0214fc6a28774362556e4 Author: Daniel Kulp AuthorDate: Wed Aug 30 12:28:20 2023 -0400 Add system properly to force use of older URLConnection --- .../cxf/transport/http/HTTPTransportFactory.java | 11 ++- .../cxf/transport/http/HttpClientHTTPConduit.java | 81 -- .../transport/http/URLConnectionHTTPConduit.java | 7 -- 3 files changed, 53 insertions(+), 46 deletions(-) diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java index f13e236425..40d42c8e31 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java @@ -37,6 +37,7 @@ import java.util.logging.Logger; import org.apache.cxf.Bus; import org.apache.cxf.common.injection.NoJSR250Annotations; import org.apache.cxf.common.logging.LogUtils; +import org.apache.cxf.common.util.SystemPropertyAction; import org.apache.cxf.configuration.Configurer; import org.apache.cxf.service.Service; import org.apache.cxf.service.model.BindingInfo; @@ -84,6 +85,9 @@ public class HTTPTransportFactory private final ReadWriteLock lock = new ReentrantReadWriteLock(); private final Lock r = lock.readLock(); private final Lock w = lock.writeLock(); + +private boolean forceURLConnectionConduit += Boolean.valueOf(SystemPropertyAction.getProperty("org.apache.cxf.transport.http.forceURLConnection")); public HTTPTransportFactory() { this(new DestinationRegistryImpl()); @@ -233,8 +237,11 @@ public class HTTPTransportFactory conduit = factory.createConduit(this, bus, endpointInfo, target); } if (conduit == null) { -//conduit = new URLConnectionHTTPConduit(bus, endpointInfo, target); -conduit = new HttpClientHTTPConduit(bus, endpointInfo, target); +if (forceURLConnectionConduit) { +conduit = new URLConnectionHTTPConduit(bus, endpointInfo, target); +} else { +conduit = new HttpClientHTTPConduit(bus, endpointInfo, target); +} } // Spring configure the conduit. diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java index e16f9d3b48..b40b6904dc 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpClientHTTPConduit.java @@ -90,10 +90,6 @@ public class HttpClientHTTPConduit extends URLConnectionHTTPConduit { volatile HttpClient client; volatile int lastTlsHash = -1; volatile URI sslURL; - -public HttpClientHTTPConduit(Bus b, EndpointInfo ei) throws IOException { -super(b, ei); -} public HttpClientHTTPConduit(Bus b, EndpointInfo ei, EndpointReferenceType t) throws IOException { super(b, ei, t); @@ -115,7 +111,13 @@ public class HttpClientHTTPConduit extends URLConnectionHTTPConduit { * Close the conduit */ public void close() { -if (client != null) { +if (client instanceof AutoCloseable) { +try { +((AutoCloseable)client).close(); +} catch (Exception e) { +//ignore +} +} else if (client != null) { String name = client.toString(); client = null; tryToShutdownSelector(name); @@ -398,6 +400,41 @@ public class HttpClientHTTPConduit extends URLConnectionHTTPConduit { } } +private boolean isConnectionAttemptCompleted(HTTPClientPolicy csPolicy, PipedOutputStream out) +throws IOException { +if (!connectionComplete) { +// if we haven't connected yet, we'll see if an exception is the reason +// why we haven't connected. Otherwise, wait for the connection +// to complete. +if (future.isDone()) { +try { +future.get(); +} catch (InterruptedException | ExecutionException e) { +if (e.getCause() instanceof IOException) { +throw new Fault("Could not send Message.", LOG, (IOException)e.getCause()); +} +} +return false; +} +try { +out.wait(csPolicy.getConnectionTimeout()); +
[cxf] branch main updated (1f829190e5 -> 58d8029e6f)
This is an automated email from the ASF dual-hosted git repository. dkulp pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git from 1f829190e5 Exlude transitive dep to xml-apis to avoid Java17 module issues new 3d70de80fb Add system properly to force use of older URLConnection new 58d8029e6f Re-enable checkstyle/pmd on master, fix all the issues so backporting changes is easier The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../main/java/org/apache/cxf/helpers/NSDecl.java | 2 +- .../jaxws/CxfJaxwsAutoConfiguration.java | 2 + .../AbstractObservationClientProvider.java | 4 +- .../micrometer/CxfObservationConventionUtil.java | 11 +-- .../ObservationClientStartInterceptor.java | 5 +- .../micrometer/ObservationStartInterceptor.java| 7 +- .../jaxrs/AbstractJaxrsObservationConvention.java | 4 +- .../jaxrs/ContainerRequestReceiverContext.java | 3 +- ...tainerRequestReceiverObservationConvention.java | 3 +- .../ContainerRequestSenderObservationContext.java | 3 +- ...ontainerRequestSenderObservationConvention.java | 3 +- ...tainerRequestReceiverObservationConvention.java | 11 +-- ...ontainerRequestSenderObservationConvention.java | 8 +-- .../jaxrs/JaxrsObservationDocumentation.java | 9 ++- .../jaxrs/ObservationClientProvider.java | 16 ++--- .../jaxrs/ObservationContextProvider.java | 2 +- .../micrometer/jaxrs/ObservationFeature.java | 6 +- .../micrometer/jaxrs/ObservationProvider.java | 17 ++--- .../micrometer/ObservationIntegrationTest.java | 4 +- .../AbstractOpenTelemetryProvider.java | 2 +- .../opentelemetry/OpenTelemetryFeature.java| 4 +- .../opentelemetry/jaxrs/OpenTelemetryFeature.java | 7 +- parent/pom.xml | 47 + .../cxf/jaxrs/provider/CustomJaxbProvider.java | 2 +- .../http/netty/client/NettyHttpClientRequest.java | 2 +- .../netty/server/NettyHttpDestinationTest.java | 3 +- .../cxf/transport/http/HTTPTransportFactory.java | 11 ++- .../cxf/transport/http/HttpClientHTTPConduit.java | 81 -- .../transport/http/URLConnectionHTTPConduit.java | 7 -- .../java/org/apache/cxf/ws/rm/RMManagerTest.java | 3 +- .../apache/cxf/sts/claims/LdapClaimsHandler.java | 2 +- .../cxf/sts/claims/LdapGroupClaimsHandler.java | 2 +- .../apache/cxf/sts/claims/StaticClaimsHandler.java | 4 +- .../sts/claims/StaticEndpointClaimsHandler.java| 4 +- .../apache/cxf/sts/claims/mapper/ClaimUtils.java | 4 +- .../org/apache/cxf/sts/event/map/EventMapper.java | 4 +- .../provider/jwt/DefaultJWTClaimsProvider.java | 2 +- .../sts/claims/mapper/JexlClaimsMapperTest.java| 7 +- .../cxf/sts/common/CustomAttributeProvider.java| 4 +- .../apache/cxf/systest/sts/rest/STSRESTTest.java | 4 +- .../cdi/base/tomcat/AbstractTomcatServer.java | 2 +- .../org/apache/cxf/systest/jaxrs/BookStore.java| 4 +- .../jaxrs/provider/CXFJaxbElementProvider.java | 2 +- .../systest/dispatch/DispatchClientServerTest.java | 2 +- .../org/apache/cxf/systest/jaxws/CXF7990Test.java | 2 +- .../jaxrs/sse/tomcat/AbstractTomcatServer.java | 2 +- .../systest/type_test/AbstractTypeTestClient2.java | 2 +- .../toolspec/parser/CommandLineParserTest.java | 2 +- .../jaxws/customization/CustomizationParser.java | 20 +++--- 49 files changed, 194 insertions(+), 170 deletions(-)
[cxf] branch 3.5.x-fixes updated: CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.5.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/3.5.x-fixes by this push: new f79fda70a4 CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) f79fda70a4 is described below commit f79fda70a4b556a7dd58a1ad89b1b37ade8dfb64 Author: Andrei Bastun AuthorDate: Wed Aug 30 16:32:51 2023 +0200 CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) Co-authored-by: Andrei Bastun (cherry picked from commit f424bda17e26f9db306ecd852228defc5a421986) --- .../ext/search/AbstractSearchConditionParser.java | 10 -- .../cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java | 18 ++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java index 08c4abaeb7..ca531c9818 100644 --- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java +++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java @@ -194,6 +194,7 @@ public abstract class AbstractSearchConditionParser implements SearchConditio && (isPrimitive || Date.class.isAssignableFrom(returnType) +|| Temporal.class.isAssignableFrom(returnType) || returnCollection || paramConverterAvailable(returnType)); @@ -207,8 +208,13 @@ public abstract class AbstractSearchConditionParser implements SearchConditio if (lastTry) { if (!returnCollection) { -nextObject = isPrimitive ? InjectionUtils.convertStringToPrimitive(value, returnType) -: convertToDate(returnType, value); +if (isPrimitive) { +nextObject = InjectionUtils.convertStringToPrimitive(value, returnType); +} else if (Temporal.class.isAssignableFrom(returnType)) { +nextObject = convertToTemporal((Class)returnType, value); +} else { +nextObject = convertToDate(returnType, value); +} } else { CollectionCheck collCheck = getCollectionCheck(originalPropName, true, actualReturnType); if (collCheck == null) { diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java index 26ccf89975..0acf211d5d 100644 --- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java +++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java @@ -18,6 +18,7 @@ */ package org.apache.cxf.jaxrs.ext.search.fiql; +import java.time.LocalDate; import java.util.Set; import org.apache.cxf.jaxrs.ext.search.SearchCondition; @@ -46,6 +47,14 @@ public class FiqlCollectionsTest { assertNotNull(room); } +@Test +public void testTemporalUsedOnCollection() throws SearchParseException { +FiqlParser roomParser = new FiqlParser<>(Room.class); +SearchCondition roomCondition = roomParser.parse("furniture.spec.features.localDate==2023-08-24"); +Room room = roomCondition.getCondition(); +assertNotNull(room); +} + public static class Room { Set furniture; public Set getFurniture() { @@ -88,11 +97,20 @@ public class FiqlCollectionsTest { public static class Feature { String description; +LocalDate localDate; public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } + +public LocalDate getLocalDate() { +return localDate; +} + +public void setLocalDate(LocalDate localDate) { +this.localDate = localDate; +} } } \ No newline at end of file
[cxf] branch main updated: Exlude transitive dep to xml-apis to avoid Java17 module issues
This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/main by this push: new 1f829190e5 Exlude transitive dep to xml-apis to avoid Java17 module issues 1f829190e5 is described below commit 1f829190e583560ea4bf72ea0bc67ec277884c5e Author: Daniel Kulp AuthorDate: Wed Aug 30 12:08:58 2023 -0400 Exlude transitive dep to xml-apis to avoid Java17 module issues --- .../org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java | 2 +- systests/transports/pom.xml | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java index ae0a688a48..1fd0693954 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java @@ -43,7 +43,7 @@ import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals;; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/systests/transports/pom.xml b/systests/transports/pom.xml index 71cf873461..00424efc11 100644 --- a/systests/transports/pom.xml +++ b/systests/transports/pom.xml @@ -236,6 +236,12 @@ net.sourceforge.nekohtml nekohtml 1.9.22 + + +xml-apis +xml-apis + + org.springframework
[cxf] branch 3.6.x-fixes updated (66308641af -> 959404f8cc)
This is an automated email from the ASF dual-hosted git repository. reta pushed a change to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git from 66308641af CXF-8457: Provide OpenTelemetry support. Fix README.txt new 02be25361d CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy` new 7d770b7966 Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 (#1407) new 1689d5c842 Bump io.github.openfeign:feign-core from 12.4 to 12.5 (#1405) new 484ced85b4 CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) new 6fa71dd279 CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401) new 959404f8cc Recording .gitmergeinfo Changes The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitmergeinfo | 2 ++ .../samples/jax_rs/tracing_opentelemetry/pom.xml | 4 +-- .../samples/jax_rs/tracing_opentracing/pom.xml | 4 +-- .../ext/search/AbstractSearchConditionParser.java | 10 +-- .../jaxrs/ext/search/fiql/FiqlCollectionsTest.java | 18 .../org/apache/cxf/transport/http/HTTPConduit.java | 32 ++ services/xkms/xkms-x509-handlers/pom.xml | 5 ++-- .../cxf/xkms/x509/handlers/X509LocatorTest.java| 9 +++--- 8 files changed, 67 insertions(+), 17 deletions(-)
[cxf] 05/06: CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 6fa71dd2796347e8f32f07955e27a1f6cc60983f Author: Andriy Redko AuthorDate: Wed Aug 30 10:33:11 2023 -0400 CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401) (cherry picked from commit 2ecb82b00d6ba9bdcb35c92de73d72b3faa564d7) --- services/xkms/xkms-x509-handlers/pom.xml | 5 +++-- .../java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java | 9 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/services/xkms/xkms-x509-handlers/pom.xml b/services/xkms/xkms-x509-handlers/pom.xml index 1d019125f0..7dc9c6e474 100644 --- a/services/xkms/xkms-x509-handlers/pom.xml +++ b/services/xkms/xkms-x509-handlers/pom.xml @@ -69,8 +69,9 @@ test -org.easymock -easymock +org.mockito +mockito-core +${cxf.mockito.version} test diff --git a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java index 2622444ed2..b78eae1aae 100644 --- a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java +++ b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java @@ -33,10 +33,12 @@ import org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType; import org.apache.cxf.xkms.model.xkms.UseKeyWithType; import org.apache.cxf.xkms.x509.repo.CertificateRepo; -import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Test; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; /** * Test needs a real LDAP server. */ @@ -47,9 +49,8 @@ public class X509LocatorTest { @Test public void locate() throws CertificateException { -CertificateRepo certRepo = EasyMock.createMock(CertificateRepo.class); - EasyMock.expect(certRepo.findBySubjectDn(EasyMock.eq("alice"))).andReturn(getAliceCert()); -EasyMock.replay(certRepo); +CertificateRepo certRepo = mock(CertificateRepo.class); +when(certRepo.findBySubjectDn(eq("alice"))).thenReturn(getAliceCert()); X509Locator locator = new X509Locator(certRepo); LocateRequestType request = prepareLocateXKMSRequest(); UnverifiedKeyBindingType result = locator.locate(request);
[cxf] 06/06: Recording .gitmergeinfo Changes
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 959404f8cc72a91a9ed108bf407c500ed2764688 Author: Andriy Redko AuthorDate: Wed Aug 30 10:44:59 2023 -0400 Recording .gitmergeinfo Changes --- .gitmergeinfo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitmergeinfo b/.gitmergeinfo index a4a1d37f61..fb14309b87 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -387,6 +387,7 @@ M 6c56c4c41492b9e7660474867f7ff2d69ffb3727 M 6c5a9a300ae97945b057f8867381de837461e06f M 6cc5829898b4c2324732ac98a885ea9ea1a50662 M 6d39cd9e515334e17ca84ec08deee5e6cc0dc698 +M 6e24dc2ff5b929238c0b43f7d7b2c43cdf6e44ff M 6ef9c6387f585665ecd7dd7c88337dd1389d95ed M 6f6aeef7c0365c12a3e3edb15ba49186d146b7a6 M 6ff3f5f2317acf530a9ec3bec0c958859436d2f6 @@ -530,6 +531,7 @@ M b4f5181ac1fddaf0276b4564e4cf6e9f6140bbd0 M b546325057f0baac221d0f2a535ef1ee8c0956f7 M b599d62c564e781ed566fbbfe61a8c296435febd M b5e0162219f3bf0ab42ee6570d1812e406dcf48b +M b5f42a7a9fe0f8e79c2beabb6b8e46ff68309dcc M b601438552968563aa740d9586889391b9f890bb M b67138f8caece4c98e3c44437409d4be4d3801da M b6e3ab83a37cfb777d6eebf9711e552027bde37a
[cxf] 02/06: Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 (#1407)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 7d770b79666e434b5b58723220c452a3c2009e8f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Aug 30 10:32:17 2023 -0400 Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 (#1407) Bumps [io.github.openfeign:feign-httpclient](https://github.com/openfeign/feign) from 12.4 to 12.5. - [Release notes](https://github.com/openfeign/feign/releases) - [Changelog](https://github.com/OpenFeign/feign/blob/master/CHANGELOG.md) - [Commits](https://github.com/openfeign/feign/compare/12.4...12.5) --- updated-dependencies: - dependency-name: io.github.openfeign:feign-httpclient dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 2d4464ecdf669ce480c6e8e148129bdb1f1662df) --- .../src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml | 2 +- .../src/main/release/samples/jax_rs/tracing_opentracing/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml b/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml index 9d4d1ba63c..5c68f97e30 100644 --- a/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml @@ -135,7 +135,7 @@ io.github.openfeign feign-httpclient -12.4 +12.5 io.github.openfeign.opentracing diff --git a/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml b/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml index 8d8dfb86cf..cd619d5b31 100644 --- a/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml @@ -139,7 +139,7 @@ io.github.openfeign feign-httpclient -12.4 +12.5 io.github.openfeign.opentracing
[cxf] 01/06: CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy`
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 02be25361d4f90485cebcd32ce41df8aa4249cbb Author: Leonard Wörteler AuthorDate: Sat Aug 12 17:22:26 2023 +0200 CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy` There are additional potential references to the `HttpClientFacade` hidden in the property change listeners of `HTTPClientPolicy`. To prevent those from keeping the SelectorManager thread alive, the `HTTPConduit` now registers itself as a listener only via a `WeakReference`, so the conduit can be garbage collected even if the client policy is still referenced inside the SelectorManager thread. (cherry picked from commit 728edf1b589c87715220e753208a5b1ff2a3f0cb) --- .../org/apache/cxf/transport/http/HTTPConduit.java | 32 ++ 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java index 33b6157559..801eac24e4 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.StringWriter; +import java.lang.ref.WeakReference; import java.net.HttpRetryException; import java.net.HttpURLConnection; import java.net.MalformedURLException; @@ -298,6 +299,27 @@ public abstract class HTTPConduit private volatile boolean clientSidePolicyCalced; +private final PropertyChangeListener weakRefListener = new WeakPropertyChangeListenerAdapter(this); + +/** + * Change listener that propagates events to this conduit as long as it is alive without holding a hard reference. + */ +private static final class WeakPropertyChangeListenerAdapter implements PropertyChangeListener { +/** Weak reference so the listener can be garbage collected even if it is still registered somewhere. */ +private final WeakReference reference; + +WeakPropertyChangeListenerAdapter(PropertyChangeListener inner) { +reference = new WeakReference<>(inner); +} + +@Override +public void propertyChange(PropertyChangeEvent evt) { +PropertyChangeListener inner = reference.get(); +if (inner != null) { +inner.propertyChange(evt); +} +} +} /** * Constructor @@ -352,8 +374,8 @@ public abstract class HTTPConduit this, new ClientPolicyCalculator()); if (clientSidePolicy != null) { -clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice -clientSidePolicy.addPropertyChangeListener(this); + clientSidePolicy.removePropertyChangeListener(weakRefListener); //make sure we aren't added twice + clientSidePolicy.addPropertyChangeListener(weakRefListener); } } } @@ -749,7 +771,7 @@ public abstract class HTTPConduit */ public void close() { if (clientSidePolicy != null) { -clientSidePolicy.removePropertyChangeListener(this); +clientSidePolicy.removePropertyChangeListener(weakRefListener); } } @@ -927,8 +949,8 @@ public abstract class HTTPConduit } this.clientSidePolicyCalced = true; this.clientSidePolicy = client; -clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice -clientSidePolicy.addPropertyChangeListener(this); +clientSidePolicy.removePropertyChangeListener(weakRefListener); //make sure we aren't added twice +clientSidePolicy.addPropertyChangeListener(weakRefListener); endpointInfo.setProperty("org.apache.cxf.ws.addressing.replyto", client.getDecoupledEndpoint()); }
[cxf] 04/06: CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 484ced85b4103b54c281bb3fb471fa694b56c19c Author: Andrei Bastun AuthorDate: Wed Aug 30 16:32:51 2023 +0200 CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) Co-authored-by: Andrei Bastun (cherry picked from commit f424bda17e26f9db306ecd852228defc5a421986) --- .../ext/search/AbstractSearchConditionParser.java | 10 -- .../cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java | 18 ++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java index 08c4abaeb7..ca531c9818 100644 --- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java +++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java @@ -194,6 +194,7 @@ public abstract class AbstractSearchConditionParser implements SearchConditio && (isPrimitive || Date.class.isAssignableFrom(returnType) +|| Temporal.class.isAssignableFrom(returnType) || returnCollection || paramConverterAvailable(returnType)); @@ -207,8 +208,13 @@ public abstract class AbstractSearchConditionParser implements SearchConditio if (lastTry) { if (!returnCollection) { -nextObject = isPrimitive ? InjectionUtils.convertStringToPrimitive(value, returnType) -: convertToDate(returnType, value); +if (isPrimitive) { +nextObject = InjectionUtils.convertStringToPrimitive(value, returnType); +} else if (Temporal.class.isAssignableFrom(returnType)) { +nextObject = convertToTemporal((Class)returnType, value); +} else { +nextObject = convertToDate(returnType, value); +} } else { CollectionCheck collCheck = getCollectionCheck(originalPropName, true, actualReturnType); if (collCheck == null) { diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java index 26ccf89975..0acf211d5d 100644 --- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java +++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java @@ -18,6 +18,7 @@ */ package org.apache.cxf.jaxrs.ext.search.fiql; +import java.time.LocalDate; import java.util.Set; import org.apache.cxf.jaxrs.ext.search.SearchCondition; @@ -46,6 +47,14 @@ public class FiqlCollectionsTest { assertNotNull(room); } +@Test +public void testTemporalUsedOnCollection() throws SearchParseException { +FiqlParser roomParser = new FiqlParser<>(Room.class); +SearchCondition roomCondition = roomParser.parse("furniture.spec.features.localDate==2023-08-24"); +Room room = roomCondition.getCondition(); +assertNotNull(room); +} + public static class Room { Set furniture; public Set getFurniture() { @@ -88,11 +97,20 @@ public class FiqlCollectionsTest { public static class Feature { String description; +LocalDate localDate; public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } + +public LocalDate getLocalDate() { +return localDate; +} + +public void setLocalDate(LocalDate localDate) { +this.localDate = localDate; +} } } \ No newline at end of file
[cxf] 03/06: Bump io.github.openfeign:feign-core from 12.4 to 12.5 (#1405)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git commit 1689d5c842ddde6088e4f1a071ea69c45aaa60db Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Aug 30 10:32:42 2023 -0400 Bump io.github.openfeign:feign-core from 12.4 to 12.5 (#1405) Bumps [io.github.openfeign:feign-core](https://github.com/openfeign/feign) from 12.4 to 12.5. - [Release notes](https://github.com/openfeign/feign/releases) - [Changelog](https://github.com/OpenFeign/feign/blob/master/CHANGELOG.md) - [Commits](https://github.com/openfeign/feign/compare/12.4...12.5) --- updated-dependencies: - dependency-name: io.github.openfeign:feign-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit ab9c703f06108ce8cacc475f68f426ca5a0bbdaa) --- .../src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml | 2 +- .../src/main/release/samples/jax_rs/tracing_opentracing/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml b/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml index 5c68f97e30..24f69f478d 100644 --- a/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml @@ -130,7 +130,7 @@ io.github.openfeign feign-core -12.4 +12.5 io.github.openfeign diff --git a/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml b/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml index cd619d5b31..91b977adc7 100644 --- a/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/tracing_opentracing/pom.xml @@ -134,7 +134,7 @@ io.github.openfeign feign-core -12.4 +12.5 io.github.openfeign
[cxf] branch main updated: CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/main by this push: new 2ecb82b00d CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401) 2ecb82b00d is described below commit 2ecb82b00d6ba9bdcb35c92de73d72b3faa564d7 Author: Andriy Redko AuthorDate: Wed Aug 30 10:33:11 2023 -0400 CXF-8853: Get rid of EasyMock in cxf-services-xkms-x509-handlers (#1401) --- services/xkms/xkms-x509-handlers/pom.xml | 5 +++-- .../java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java | 9 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/services/xkms/xkms-x509-handlers/pom.xml b/services/xkms/xkms-x509-handlers/pom.xml index ca245334b8..8e71e7f0dc 100644 --- a/services/xkms/xkms-x509-handlers/pom.xml +++ b/services/xkms/xkms-x509-handlers/pom.xml @@ -57,8 +57,9 @@ test -org.easymock -easymock +org.mockito +mockito-core +${cxf.mockito.version} test diff --git a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java index 2622444ed2..b78eae1aae 100644 --- a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java +++ b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java @@ -33,10 +33,12 @@ import org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType; import org.apache.cxf.xkms.model.xkms.UseKeyWithType; import org.apache.cxf.xkms.x509.repo.CertificateRepo; -import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Test; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; /** * Test needs a real LDAP server. */ @@ -47,9 +49,8 @@ public class X509LocatorTest { @Test public void locate() throws CertificateException { -CertificateRepo certRepo = EasyMock.createMock(CertificateRepo.class); - EasyMock.expect(certRepo.findBySubjectDn(EasyMock.eq("alice"))).andReturn(getAliceCert()); -EasyMock.replay(certRepo); +CertificateRepo certRepo = mock(CertificateRepo.class); +when(certRepo.findBySubjectDn(eq("alice"))).thenReturn(getAliceCert()); X509Locator locator = new X509Locator(certRepo); LocateRequestType request = prepareLocateXKMSRequest(); UnverifiedKeyBindingType result = locator.locate(request);
[cxf] branch main updated: CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408)
This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/main by this push: new f424bda17e CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) f424bda17e is described below commit f424bda17e26f9db306ecd852228defc5a421986 Author: Andrei Bastun AuthorDate: Wed Aug 30 16:32:51 2023 +0200 CXF-8920: use the same approach with Temporal.class.isAssignableFrom check as used for non-collection fields to recognize and convert temporal values (#1408) Co-authored-by: Andrei Bastun --- .../ext/search/AbstractSearchConditionParser.java | 10 -- .../cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java | 18 ++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java index 08c4abaeb7..ca531c9818 100644 --- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java +++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java @@ -194,6 +194,7 @@ public abstract class AbstractSearchConditionParser implements SearchConditio && (isPrimitive || Date.class.isAssignableFrom(returnType) +|| Temporal.class.isAssignableFrom(returnType) || returnCollection || paramConverterAvailable(returnType)); @@ -207,8 +208,13 @@ public abstract class AbstractSearchConditionParser implements SearchConditio if (lastTry) { if (!returnCollection) { -nextObject = isPrimitive ? InjectionUtils.convertStringToPrimitive(value, returnType) -: convertToDate(returnType, value); +if (isPrimitive) { +nextObject = InjectionUtils.convertStringToPrimitive(value, returnType); +} else if (Temporal.class.isAssignableFrom(returnType)) { +nextObject = convertToTemporal((Class)returnType, value); +} else { +nextObject = convertToDate(returnType, value); +} } else { CollectionCheck collCheck = getCollectionCheck(originalPropName, true, actualReturnType); if (collCheck == null) { diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java index 26ccf89975..0acf211d5d 100644 --- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java +++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlCollectionsTest.java @@ -18,6 +18,7 @@ */ package org.apache.cxf.jaxrs.ext.search.fiql; +import java.time.LocalDate; import java.util.Set; import org.apache.cxf.jaxrs.ext.search.SearchCondition; @@ -46,6 +47,14 @@ public class FiqlCollectionsTest { assertNotNull(room); } +@Test +public void testTemporalUsedOnCollection() throws SearchParseException { +FiqlParser roomParser = new FiqlParser<>(Room.class); +SearchCondition roomCondition = roomParser.parse("furniture.spec.features.localDate==2023-08-24"); +Room room = roomCondition.getCondition(); +assertNotNull(room); +} + public static class Room { Set furniture; public Set getFurniture() { @@ -88,11 +97,20 @@ public class FiqlCollectionsTest { public static class Feature { String description; +LocalDate localDate; public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } + +public LocalDate getLocalDate() { +return localDate; +} + +public void setLocalDate(LocalDate localDate) { +this.localDate = localDate; +} } } \ No newline at end of file
[cxf] branch dependabot/maven/io.github.openfeign-feign-core-12.5 deleted (was 6e236e514f)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/io.github.openfeign-feign-core-12.5 in repository https://gitbox.apache.org/repos/asf/cxf.git was 6e236e514f Bump io.github.openfeign:feign-core from 12.4 to 12.5 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[cxf] branch main updated (b5f42a7a9f -> ab9c703f06)
This is an automated email from the ASF dual-hosted git repository. reta pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git from b5f42a7a9f Bump org.wiremock:wiremock from 3.0.0-beta-15 to 3.0.0 (#1406) add ab9c703f06 Bump io.github.openfeign:feign-core from 12.4 to 12.5 (#1405) No new revisions were added by this update. Summary of changes: .../src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml | 2 +- .../src/main/release/samples/jax_rs/tracing_opentracing/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
[cxf] branch dependabot/maven/org.wiremock-wiremock-3.0.0 deleted (was b71e84330e)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.wiremock-wiremock-3.0.0 in repository https://gitbox.apache.org/repos/asf/cxf.git was b71e84330e Bump org.wiremock:wiremock from 3.0.0-beta-15 to 3.0.0 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[cxf] branch main updated (2d4464ecdf -> b5f42a7a9f)
This is an automated email from the ASF dual-hosted git repository. reta pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git from 2d4464ecdf Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 (#1407) add b5f42a7a9f Bump org.wiremock:wiremock from 3.0.0-beta-15 to 3.0.0 (#1406) No new revisions were added by this update. Summary of changes: parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[cxf] branch dependabot/maven/io.github.openfeign-feign-httpclient-12.5 deleted (was aa84ebc58c)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/io.github.openfeign-feign-httpclient-12.5 in repository https://gitbox.apache.org/repos/asf/cxf.git was aa84ebc58c Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[cxf] branch main updated (728edf1b58 -> 2d4464ecdf)
This is an automated email from the ASF dual-hosted git repository. reta pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git from 728edf1b58 CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy` add 2d4464ecdf Bump io.github.openfeign:feign-httpclient from 12.4 to 12.5 (#1407) No new revisions were added by this update. Summary of changes: .../src/main/release/samples/jax_rs/tracing_opentelemetry/pom.xml | 2 +- .../src/main/release/samples/jax_rs/tracing_opentracing/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
[cxf-fediz] branch dependabot/maven/org.easymock-easymock-5.2.0 created (now 5be215d9)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.easymock-easymock-5.2.0 in repository https://gitbox.apache.org/repos/asf/cxf-fediz.git at 5be215d9 Bump org.easymock:easymock from 5.1.0 to 5.2.0 No new revisions were added by this update.
[cxf] branch main updated: CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy`
This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/main by this push: new 728edf1b58 CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy` 728edf1b58 is described below commit 728edf1b589c87715220e753208a5b1ff2a3f0cb Author: Leonard Wörteler AuthorDate: Sat Aug 12 17:22:26 2023 +0200 CXF-8885: Eliminate hard refs to `HttpClient` via `HTTPClientPolicy` There are additional potential references to the `HttpClientFacade` hidden in the property change listeners of `HTTPClientPolicy`. To prevent those from keeping the SelectorManager thread alive, the `HTTPConduit` now registers itself as a listener only via a `WeakReference`, so the conduit can be garbage collected even if the client policy is still referenced inside the SelectorManager thread. --- .../org/apache/cxf/transport/http/HTTPConduit.java | 32 ++ 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java index 33b6157559..801eac24e4 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.StringWriter; +import java.lang.ref.WeakReference; import java.net.HttpRetryException; import java.net.HttpURLConnection; import java.net.MalformedURLException; @@ -298,6 +299,27 @@ public abstract class HTTPConduit private volatile boolean clientSidePolicyCalced; +private final PropertyChangeListener weakRefListener = new WeakPropertyChangeListenerAdapter(this); + +/** + * Change listener that propagates events to this conduit as long as it is alive without holding a hard reference. + */ +private static final class WeakPropertyChangeListenerAdapter implements PropertyChangeListener { +/** Weak reference so the listener can be garbage collected even if it is still registered somewhere. */ +private final WeakReference reference; + +WeakPropertyChangeListenerAdapter(PropertyChangeListener inner) { +reference = new WeakReference<>(inner); +} + +@Override +public void propertyChange(PropertyChangeEvent evt) { +PropertyChangeListener inner = reference.get(); +if (inner != null) { +inner.propertyChange(evt); +} +} +} /** * Constructor @@ -352,8 +374,8 @@ public abstract class HTTPConduit this, new ClientPolicyCalculator()); if (clientSidePolicy != null) { -clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice -clientSidePolicy.addPropertyChangeListener(this); + clientSidePolicy.removePropertyChangeListener(weakRefListener); //make sure we aren't added twice + clientSidePolicy.addPropertyChangeListener(weakRefListener); } } } @@ -749,7 +771,7 @@ public abstract class HTTPConduit */ public void close() { if (clientSidePolicy != null) { -clientSidePolicy.removePropertyChangeListener(this); +clientSidePolicy.removePropertyChangeListener(weakRefListener); } } @@ -927,8 +949,8 @@ public abstract class HTTPConduit } this.clientSidePolicyCalced = true; this.clientSidePolicy = client; -clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice -clientSidePolicy.addPropertyChangeListener(this); +clientSidePolicy.removePropertyChangeListener(weakRefListener); //make sure we aren't added twice +clientSidePolicy.addPropertyChangeListener(weakRefListener); endpointInfo.setProperty("org.apache.cxf.ws.addressing.replyto", client.getDecoupledEndpoint()); }