-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add jersey-client as dependency of pulsar-client-auth-sasl #10055
Add jersey-client as dependency of pulsar-client-auth-sasl #10055
Conversation
Why are we able to build that module without adding the dependency? |
Here's the completed exception stack.
From public static ClientBuilder newBuilder() {
try {
Object delegate = FactoryFinder.find("javax.ws.rs.client.ClientBuilder", "org.glassfish.jersey.client.JerseyClientBuilder", ClientBuilder.class);
if (!(delegate instanceof ClientBuilder)) {
Class pClass = ClientBuilder.class;
String classnameAsResource = pClass.getName().replace('.', '/') + ".class";
ClassLoader loader = pClass.getClassLoader();
if (loader == null) {
loader = ClassLoader.getSystemClassLoader();
} It tries to load |
Do we have test case? Why the tests are not failing? |
Maybe it's because the tests uses the Lines 604 to 608 in 1b8da92
I'm not very familiar to Maven and not sure if it could be loaded by sub-module implicitly in tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Btw it is better to have the explicit dependency here.
I was just asking those questions in order to understand better the problem
/pulsarbot run-failure-checks |
Motivation
When using
AuthenticationSasl
,ClassNotFoundException
will be thrown:The
jersey-client
dependency must be imported. However the version ofjersey-client
must be consistent with whatpulsar-client-auth-sasl
depends, which is 2.31 currently. For example, if a newer version ofjersey-client
was imported likeAnother exception would be thrown:
So the best way to fix it is adding
jersey-client
as dependency ofpulsar-client-auth-sasl
.Modifications
Add
jersey-client
as dependency ofpulsar-client-auth-sasl
.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.