[ https://issues.apache.org/jira/browse/MRESOLVER-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735184#comment-17735184 ]
ASF GitHub Bot commented on MRESOLVER-220: ------------------------------------------ cstamas commented on code in PR #301: URL: https://github.com/apache/maven-resolver/pull/301#discussion_r1234937863 ########## maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java: ########## @@ -266,7 +267,7 @@ public void run() { chained.run(); } loser.await(); - } catch (IllegalStateException e) { + } catch (IllegalStateException | LockUpgradeNotSupportedException e) { e.printStackTrace(); // for ref purposes Review Comment: This is test support class, not used in prod > Modify signaling for unsupported operations > ------------------------------------------- > > Key: MRESOLVER-220 > URL: https://issues.apache.org/jira/browse/MRESOLVER-220 > Project: Maven Resolver > Issue Type: Improvement > Components: Resolver > Reporter: Tamas Cservenak > Assignee: Tamas Cservenak > Priority: Major > Fix For: 1.9.13 > > > Lock upgrading is not supported, it is the caller that must be aware of this. > Currently the code for all implementations returns {{false}} in case of lock > upgrade attempted, same way as locking failed. IMHO, we should change this to > some exception maybe? > In short: code attempting unsupported "lock upgrade" should fail fast and > with a clear reason ("illegal op"). Fail fast will happen with a runtime > exception thrown and bubbling up all to the caller to make it clear, that > there is some problem with code, that cannot be fixed without code change. -- This message was sent by Atlassian Jira (v8.20.10#820010)