maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rami Ojares (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5979) Maven distribution is not compiled with generics
Date Tue, 16 Feb 2016 22:08:18 GMT

    [ https://issues.apache.org/jira/browse/MNG-5979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149413#comment-15149413
] 

Rami Ojares commented on MNG-5979:
----------------------------------

Yes you are right.
I typed that wrongly in a hurry.
But the issue that I am really talking about remains.
Does it not?

Let me rephrase:
Set<Artifact> al = project.getPluginArtifacts();
will produce an error.
But this will not
Set al = project.getPluginArtifacts();

> Maven distribution is not compiled with generics
> ------------------------------------------------
>
>                 Key: MNG-5979
>                 URL: https://issues.apache.org/jira/browse/MNG-5979
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.3.9
>         Environment: linux, java 8
>            Reporter: Rami Ojares
>            Assignee: Karl Heinz Marbaise
>
> Reading maven javadoc api it contains generic types.
> But when in my Mojo I try to use them the collections seem not to know anything about
generics.
> Example:
> project.getPluginArtifacts() returns List not List<Artifacts>
> I can still cast the Objects from the list to Artifact type.
> But
> List<Artifact> al = project.getPluginArtifacts();
> will produce an error.
> I simply downladed compiled version of maven 3.3.9 from maven's own site.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message