[MNG-8727] fix unnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catch#2336
[MNG-8727] fix unnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catch#2336Pankraz76 wants to merge 1 commit intoapache:masterfrom
unnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catch#2336Conversation
|
leftover...
thats why CPU |
|
Is this an unchecked exception? |
|
| @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.
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.
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? |
…moting ExecutorException to checked
kindly request critics. |
Java 24 - fix unnecessary throws leftover; promoting ExecutorException to checkedJava 24 - fix unnecessary throws leftover; promoting ExecutorException from Runtime- to Exception being stringent to ensure catch
| * @since 4.0.0 | ||
| */ | ||
| @Experimental | ||
| public class ExecutorException extends RuntimeException { |
There was a problem hiding this comment.
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 catchJava 24 - fix unnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catch
Java 24 - fix unnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catchunnecessary throws leftover; promoting ExecutorException to Exception being stringent to ensure catch
| } | ||
| } catch (Exception e) { | ||
| throw new ExecutorException("Failed to dispose runtime created realms", e); | ||
| throw new RuntimeException(new ExecutorException("Failed to dispose runtime created realms", e)); |
There was a problem hiding this comment.
this makes zero sense. First make the actual exception a checked exception, then wrap it into a (untyped) runtime exception.
Now there is no longer a ExecutorException thrown but a RuntimeException.
AI Slop.
|
Replacing this exception is questionable and a change to the visible API for no value. |
|
Resolve #9569 |


Uh oh!
There was an error while loading. Please reload this page.