Open krueger71 opened 10 years ago
In version 2.9.1 this method ends prematurely on the first successful package match
public boolean match(Collection expectedPackages) { if (packages.size() == expectedPackages.size()) { for (Iterator i = expectedPackages.iterator(); i.hasNext();) { Object next = i.next(); if (next instanceof JavaPackage) { JavaPackage nextPackage = (JavaPackage) next; if (!matchPackage(nextPackage)) { return false; } } else { break; } return true; } } return false; }
This version works as expected, letting all packages be matched before returning true
public boolean match(Collection expectedPackages) { if (packages.size() == expectedPackages.size()) { for (Iterator i = expectedPackages.iterator(); i.hasNext();) { Object next = i.next(); if (next instanceof JavaPackage) { JavaPackage nextPackage = (JavaPackage) next; if (!matchPackage(nextPackage)) { return false; } } } return true; } return false; }
In version 2.9.1 this method ends prematurely on the first successful package match
This version works as expected, letting all packages be matched before returning true