You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/02 15:18:18 UTC
[GitHub] [pulsar] nodece opened a new pull request, #15414: [fix][tls] remove throw exception in getProvider
nodece opened a new pull request, #15414:
URL: https://github.com/apache/pulsar/pull/15414
Signed-off-by: Zixuan Liu <no...@gmail.com>
### Motivation
When cannot find the BouncyCastleFipsProvider or BouncyCastleProvider, we shouldn't throw any exception, it is unnecessary.
### Modifications
- Remove throw exception in getProvider
### Documentation
Need to update docs?
- [x] `no-need-doc`
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
nodece commented on code in PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#discussion_r865517342
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java:
##########
@@ -110,8 +110,8 @@ public static Provider getProvider() {
return getBCProviderFromClassPath();
} catch (Exception e) {
log.warn("Not able to get Bouncy Castle provider for both FIPS and Non-FIPS from class path:", e);
- throw new RuntimeException(e);
}
+ return null;
Review Comment:
We don't use this TLS provider, the purpose of this is to add a BC provider to the JDK.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
mattisonchao commented on code in PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#discussion_r865484434
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java:
##########
@@ -110,8 +110,8 @@ public static Provider getProvider() {
return getBCProviderFromClassPath();
} catch (Exception e) {
log.warn("Not able to get Bouncy Castle provider for both FIPS and Non-FIPS from class path:", e);
- throw new RuntimeException(e);
}
+ return null;
Review Comment:
`Optional` will be better than null.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#issuecomment-1166753675
The pr had no activity for 30 days, mark with Stale label.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Technoboy- closed pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
Technoboy- closed pull request #15414: [fix][tls] remove throw exception in getProvider
URL: https://github.com/apache/pulsar/pull/15414
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] poorbarcode commented on pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#issuecomment-1115772390
If return null, this public constant also will be null, it doesn't feel right to me.
https://github.com/apache/pulsar/blob/46c2817e4ae6cfe469f1149031fd51bc84c3cee7/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java#L74
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece commented on pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
nodece commented on PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#issuecomment-1116231487
@poorbarcode We cannot delete these, it is used to load the Bouncy Castle provider.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nodece closed pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
nodece closed pull request #15414: [fix][tls] remove throw exception in getProvider
URL: https://github.com/apache/pulsar/pull/15414
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] poorbarcode commented on pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#issuecomment-1116236196
> @poorbarcode We cannot delete these, it is used to load the Bouncy Castle provider.
Received, thank you.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] poorbarcode commented on pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#issuecomment-1115772391
If return null, this public constant also will be null, it doesn't feel right to me.
https://github.com/apache/pulsar/blob/46c2817e4ae6cfe469f1149031fd51bc84c3cee7/pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java#L74
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15414: [fix][tls] remove throw exception in getProvider
Posted by GitBox <gi...@apache.org>.
mattisonchao commented on code in PR #15414:
URL: https://github.com/apache/pulsar/pull/15414#discussion_r865483093
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java:
##########
@@ -110,8 +110,8 @@ public static Provider getProvider() {
return getBCProviderFromClassPath();
} catch (Exception e) {
log.warn("Not able to get Bouncy Castle provider for both FIPS and Non-FIPS from class path:", e);
- throw new RuntimeException(e);
}
+ return null;
Review Comment:
LGTM, left a trivial comment.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org