Пример #1
0
 /**
  * Gets the list of all registered issues excluding the issues specified by <code>excludeIds
  * </code>.
  *
  * @param excludeIds collection of IDs representing issues that will not be returned in the list
  * @param current build version
  * @param neu build version
  * @return list of issues sorted by build version in which they appear
  */
 public static List<VersionCompatibilityIssue> getEvents(
     Collection<Integer> excludeIds, BuildInformation current, BuildInformation neu) {
   if (excludeIds == null) {
     excludeIds = Collections.emptySet();
   }
   List<VersionCompatibilityIssue> issueList = new ArrayList<>();
   for (VersionCompatibilityIssue evt : VERSION_COMPATIBILITY_ISSUES) {
     if (!excludeIds.contains(evt.getCause().getId())) {
       BuildVersion currentVersion =
           new BuildVersion(
               current.getMajorVersion(), current.getMinorVersion(),
               current.getPointVersion(), current.getRevisionNumber());
       // If the currentVersion is newer than the issue described, then there
       // is no problem.  This can occur for instance when we discovered a
       // flag day too late (and we added the flag day description to the
       // code way after the revision).
       if (currentVersion.compareTo(evt.getVersion()) < 0) {
         issueList.add(evt);
       }
     }
   }
   Collections.sort(issueList, VERSION_COMPARATOR);
   return Collections.unmodifiableList(issueList);
 }