-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MNG-8727] Prepare for Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
to Exception
being stringent to ensure catch
#2336
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
base: master
Are you sure you want to change the base?
Conversation
leftover... ![]() thats why CPU |
Is this an unchecked exception? |
|
@@ -100,8 +100,7 @@ public String artifactPath(ExecutorRequest.Builder executorRequest, String gav, | |||
} | |||
|
|||
@Override | |||
public String metadataPath(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) | |||
throws ExecutorException { | |||
public String metadataPath(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) { |
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.
The interface actually throws the exception. Given this is a public method, I'd rather keep it, as it may forbid derived classes to actually throw the exception in an overridden method.
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.
Ah, it's an unchecked exception, so the argument is moot.
Unchecked ones should be in Javadoc only, not on the signature. |
Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
to checked
why guess, when able to make clear statement? |
impl/maven-executor/src/main/java/org/apache/maven/api/cli/ExecutorException.java
Outdated
Show resolved
Hide resolved
…moting ExecutorException to checked
kindly request critics. |
Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
to checked
Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
from Runtime-
to Exception
being stringent to ensure catch
@@ -29,7 +29,7 @@ | |||
* @since 4.0.0 | |||
*/ | |||
@Experimental | |||
public class ExecutorException extends RuntimeException { |
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.
sounds important
enough, being worth to give dedication
and segregation
.
Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
from Runtime-
to Exception
being stringent to ensure catch
Java 24
- fix unnecessary
throws leftover; promoting ExecutorException
to Exception
being stringent to ensure catch
[MNG-8727] Prepare for
Java 24
- fixunnecessary
throws leftover; promotingExecutorException
toException
being stringent to ensurecatch
.