elharo commented on code in PR #1451:
URL: https://github.com/apache/maven-scm/pull/1451#discussion_r4600780936
##########
maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/HgScmProvider.java:
##########
@@ -123,7 +123,7 @@ private HgUrlParserResult parseScmUrl(String
scmSpecificUrl) {
} else {
try {
new File(scmSpecificUrl);
- } catch (Throwable e) {
+ } catch (NullPointerException e) {
Review Comment:
scmSpecificUrl has already been dereferenced multiple times before this is
reached. No try-catch is needed. In fact, now that I look at it this whole
try-catch block can be deleted. In fact, the whole else block is effectively
dead code.
--
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]