[jboss-cvs] JBossAS SVN: r95797 - projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 29 19:20:33 EDT 2009
Author: alesj
Date: 2009-10-29 19:20:33 -0400 (Thu, 29 Oct 2009)
New Revision: 95797
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort/DominoOrdering.java
Log:
Check both sides before making a decision.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort/DominoOrdering.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort/DominoOrdering.java 2009-10-29 23:14:49 UTC (rev 95796)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort/DominoOrdering.java 2009-10-29 23:20:33 UTC (rev 95797)
@@ -81,14 +81,12 @@
// lets try to do more exact match
// although we should aviod singe dimension checks
// which are already part of match() check
- if (fstXsnd > 1 || (oneTail.dimension() > 1 && twoHead.dimension() > 1 && twoHead.intersect(oneTail) > 1))
- {
- relation = -1;
- }
- else if (sndXfst > 1 || (twoTail.dimension() > 1 && oneHead.dimension() > 1 && oneHead.intersect(twoTail) > 1))
- {
- relation = 1;
- }
+ int thXot = (oneTail.dimension() > 1 && twoHead.dimension() > 1) ? twoHead.intersect(oneTail) : 1;
+ int before = Math.max(fstXsnd, thXot);
+ int ohXtt = (oneHead.dimension() > 1 && twoTail.dimension() > 1) ? oneHead.intersect(twoTail) : 1;
+ int after = Math.max(sndXfst, ohXtt);
+ relation = after - before; // do we have some more exact match?
+
// make name compare lazy - might already be fixed with transitive order
}
else
More information about the jboss-cvs-commits
mailing list