Github user jaikiran commented on a diff in the pull request:
https://github.com/apache/ant-ivy/pull/53#discussion_r129757849
--- Diff:
src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
---
@@ -85,14 +85,12 @@ public LatestCompatibleConflictManager(String name,
LatestStrategy strategy) {
if (versionMatcher.isDynamic(mrid)) {
while (iter.hasNext()) {
IvyNode other = iter.next();
- if (versionMatcher.isDynamic(other.getResolvedId())) {
+ if (versionMatcher.isDynamic(other.getResolvedId())
+ || !versionMatcher.accept(mrid,
other.getResolvedId())
+ && !handleIncompatibleConflict(parent, conflicts,
node, other)) {
--- End diff --
You are right. Although I was aware of short circuiting, I had a wrong
semantic in mind about it. I was under the impression, the short circuiting
happens "smartly" depending on what other operators are present in that
expression. I read up the JLS (section 15.24)[1] now and as you note, the right
side of the `||` will be completely ignored (irrespective of what additional
operators exist in that expression) if the left side returns true. So this
change of the `if` block is fine.
[1] http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.24
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]