public static List getIssuesForVersion()

in src/main/java/org/apache/maven/plugins/issues/IssueUtils.java [89:120]


    public static List<Issue> getIssuesForVersion( List<Issue> issues, String version )
        throws MojoExecutionException
    {
        List<Issue> issuesForVersion = new ArrayList<>();
        boolean isFound = false;
        Issue issue;
        String releaseVersion = version;

        // Remove "-SNAPSHOT" from the end of the version, if it's there
        if ( version != null && version.endsWith( SNAPSHOT_SUFFIX ) )
        {
            releaseVersion = version.substring( 0, version.length() - SNAPSHOT_SUFFIX.length() );
        }

        for ( Issue issue1 : issues )
        {
            issue = issue1;

            if ( issue.getFixVersions() != null && issue.getFixVersions().contains( releaseVersion ) )
            {
                isFound = true;
                issuesForVersion.add( issue );
            }
        }

        if ( !isFound )
        {
            throw new MojoExecutionException( "Couldn't find any issues for the version '" + releaseVersion
                + "' among the supplied issues: " + toString( issues ) );
        }
        return issuesForVersion;
    }