matthiasblaesing commented on PR #6582:
URL: https://github.com/apache/netbeans/pull/6582#issuecomment-1773871387
Ok, my take on this is:
a) jersey is broken because it relies on autodetection of features and does
not protect against classes it can't load
b) relying on autodiscovery is nice, but broken if you don't control the
whole classpath
For "REST Client" I think the solution is trivial
(`CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE` disabled auto detection):
```java
private void buildClient(boolean verifySslCertificates) {
ClientConfig config = new ClientConfig()
.connectorProvider(new ApacheConnectorProvider())
.property(ClientProperties.CONNECT_TIMEOUT, 20000)
.property(ClientProperties.FOLLOW_REDIRECTS, true)
.property(CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE,
true)
.property(JsonGenerator.PRETTY_PRINTING, true)
.register(new LoggingFeature(logger, Level.INFO,
LoggingFeature.Verbosity.HEADERS_ONLY, 8192));
client = verifySslCertificates
? ClientBuilder.newBuilder().withConfig(config).build()
:
ClientBuilder.newBuilder().sslContext(getSslContext()).withConfig(config).build();
}
```
I checked the "Oracle Cloud Integration" module and it depends on the
exported classes to be Jersey 2, this looks like a harder problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists