Improve error message for unresolved expressions#11615
Improve error message for unresolved expressions#11615GaoSSR wants to merge 4 commits intoapache:masterfrom
Conversation
Signed-off-by: 高春晖 <18220699480@163.com>
| enhanced.append("Failed to collect dependencies"); | ||
|
|
||
| org.eclipse.aether.graph.Dependency root = request.getRoot(); | ||
| if (root != null && root.getArtifact() != null) { |
There was a problem hiding this comment.
| if (root != null && root.getArtifact() != null) { | |
| return if (root != null && root.getArtifact() != null) ? enhanceDependency() : enhanceDependencies(...); |
could be extracted as dedicated branch/concern to provide cohesion over coupling.
There was a problem hiding this comment.
ternary operators are harder to read
There was a problem hiding this comment.
It's not about formatting. The word "if" is clearer than the question mark symbol
| } | ||
| } | ||
|
|
||
| for (org.eclipse.aether.graph.Dependency dep : request.getDependencies()) { |
There was a problem hiding this comment.
could be extracted as dedicated branch/concern to provide cohesion over coupling.
| for (org.eclipse.aether.graph.Dependency dep : request.getDependencies()) { | |
| return enhanceDependencies(...) |
There was a problem hiding this comment.
I have no idea what that comment means
| } catch (DependencyCollectionException e) { | ||
| throw new DependencyResolverException("Unable to collect dependencies", e); | ||
| String enhancedMessage = enhanceCollectionError(e, collectRequest); | ||
| throw new DependencyResolverException(enhancedMessage, e); |
There was a problem hiding this comment.
| throw new DependencyResolverException(enhancedMessage, e); | |
| throw new DependencyResolverException(enhanceCollectionError(e, collectRequest), e); |
| } catch (DependencyCollectionException e) { | ||
| throw new DependencyResolverException("Unable to collect dependencies", e); | ||
| String enhancedMessage = enhanceCollectionError(e, collectRequest); | ||
| throw new DependencyResolverException(enhancedMessage, e); |
| enhanced.append("Failed to collect dependencies"); | ||
|
|
||
| org.eclipse.aether.graph.Dependency root = request.getRoot(); | ||
| if (root != null && root.getArtifact() != null) { |
There was a problem hiding this comment.
ternary operators are harder to read
Adjust if statement formatting to comply with project code style: - Split OR conditions onto separate lines with proper indentation - Ensures consistency with Spotless formatting rules
5867ad5 to
1bafff2
Compare
|
Thanks for the reviews! Ready to merge? |
|
The CI failure on macOS + Java 25 is a network timeout issue when downloading I've pushed an empty commit to trigger a re-run. Should pass once the network is stable. |
Signed-off-by: 高春晖 <18220699480@163.com>


Fixes #10324