[ https://issues.apache.org/jira/browse/MRESOLVER-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735162#comment-17735162 ]
ASF GitHub Bot commented on MRESOLVER-220: ------------------------------------------ gnodet commented on code in PR #301: URL: https://github.com/apache/maven-resolver/pull/301#discussion_r1234820922 ########## maven-resolver-named-locks-hazelcast/src/test/java/org/eclipse/aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java: ########## @@ -230,7 +231,7 @@ public void run() { chained.run(); } loser.await(); - } catch (IllegalStateException e) { + } catch (IllegalStateException | LockUpgradeNotSupportedException e) { loser.countDown(); Review Comment: The previous statement does print something, that one should be coherent imho. ########## 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: I know this is unrelated, but we could use a logger instead of stderr or just remove this statement or make it conditional ? > 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)