{"action":"closed","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1164","repository_url":"https://api.github.com/repos/mapstruct/mapstruct","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1164/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1164/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1164/events","html_url":"https://github.com/mapstruct/mapstruct/issues/1164","id":218223219,"number":1164,"title":"Missing import when using generic on generic element","user":{"login":"influence160","id":3180939,"avatar_url":"https://avatars3.githubusercontent.com/u/3180939?v=3","gravatar_id":"","url":"https://api.github.com/users/influence160","html_url":"https://github.com/influence160","followers_url":"https://api.github.com/users/influence160/followers","following_url":"https://api.github.com/users/influence160/following{/other_user}","gists_url":"https://api.github.com/users/influence160/gists{/gist_id}","starred_url":"https://api.github.com/users/influence160/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influence160/subscriptions","organizations_url":"https://api.github.com/users/influence160/orgs","repos_url":"https://api.github.com/users/influence160/repos","events_url":"https://api.github.com/users/influence160/events{/privacy}","received_events_url":"https://api.github.com/users/influence160/received_events","type":"User","site_admin":false},"labels":[{"id":5877850,"url":"https://api.github.com/repos/mapstruct/mapstruct/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"filiphr","id":6012094,"avatar_url":"https://avatars1.githubusercontent.com/u/6012094?v=3","gravatar_id":"","url":"https://api.github.com/users/filiphr","html_url":"https://github.com/filiphr","followers_url":"https://api.github.com/users/filiphr/followers","following_url":"https://api.github.com/users/filiphr/following{/other_user}","gists_url":"https://api.github.com/users/filiphr/gists{/gist_id}","starred_url":"https://api.github.com/users/filiphr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filiphr/subscriptions","organizations_url":"https://api.github.com/users/filiphr/orgs","repos_url":"https://api.github.com/users/filiphr/repos","events_url":"https://api.github.com/users/filiphr/events{/privacy}","received_events_url":"https://api.github.com/users/filiphr/received_events","type":"User","site_admin":false},"assignees":[{"login":"filiphr","id":6012094,"avatar_url":"https://avatars1.githubusercontent.com/u/6012094?v=3","gravatar_id":"","url":"https://api.github.com/users/filiphr","html_url":"https://github.com/filiphr","followers_url":"https://api.github.com/users/filiphr/followers","following_url":"https://api.github.com/users/filiphr/following{/other_user}","gists_url":"https://api.github.com/users/filiphr/gists{/gist_id}","starred_url":"https://api.github.com/users/filiphr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filiphr/subscriptions","organizations_url":"https://api.github.com/users/filiphr/orgs","repos_url":"https://api.github.com/users/filiphr/repos","events_url":"https://api.github.com/users/filiphr/events{/privacy}","received_events_url":"https://api.github.com/users/filiphr/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/21","html_url":"https://github.com/mapstruct/mapstruct/milestone/21","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/21/labels","id":2391766,"number":21,"title":"1.2.0.Beta3","description":"","creator":{"login":"agudian","id":2737102,"avatar_url":"https://avatars0.githubusercontent.com/u/2737102?v=3","gravatar_id":"","url":"https://api.github.com/users/agudian","html_url":"https://github.com/agudian","followers_url":"https://api.github.com/users/agudian/followers","following_url":"https://api.github.com/users/agudian/following{/other_user}","gists_url":"https://api.github.com/users/agudian/gists{/gist_id}","starred_url":"https://api.github.com/users/agudian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudian/subscriptions","organizations_url":"https://api.github.com/users/agudian/orgs","repos_url":"https://api.github.com/users/agudian/repos","events_url":"https://api.github.com/users/agudian/events{/privacy}","received_events_url":"https://api.github.com/users/agudian/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":5,"state":"open","created_at":"2017-03-16T20:26:36Z","updated_at":"2017-04-25T20:42:26Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2017-03-30T14:49:33Z","updated_at":"2017-04-25T20:42:26Z","closed_at":"2017-04-25T20:42:26Z","body":"My class **SearchResultDto** contains this attribute\r\n`  private List<GenericRessource<CriteriaDto>> criterias;`\r\n\r\ni have a mapper like this \r\n\r\n```\r\n@Mapper(componentModel = \"spring\", uses = {CriteriaWsMapper.class, .....(other classes)})\r\npublic abstract class SearchResultWsMapper extends GenericWsMapper<SearchResult, SearchResultDto> {\r\n....\r\n}\r\n```\r\nthis  mapper works fine with mapstructure 1.0.0.Final and generates this file \r\n\r\n```\r\npackage mydomain.ws.mappers;\r\n\r\nimport mydomain.domain.entities.SearchResult;\r\nimport mydomain.ws.dto.SearchResultDto;\r\nimport javax.annotation.Generated;\r\nimport org.springframework.beans.factory.annotation.Autowired;\r\nimport org.springframework.stereotype.Component;\r\n\r\n@Generated(\r\n    value = \"org.mapstruct.ap.MappingProcessor\",\r\n    date = \"2017-03-30T16:27:59+0200\",\r\n    comments = \"version: 1.0.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)\"\r\n)\r\n@Component\r\npublic class SearchResultWsMapperImpl extends SearchResultWsMapper {\r\n\r\n    @Autowired\r\n    private PieceWsMapper pieceWsMapper;\r\n    @Autowired\r\n    private CapaciteWsMapper capaciteWsMapper;\r\n    @Autowired\r\n    private ArgumentaireHuileWsMapper argumentaireHuileWsMapper;\r\n\r\n    @Override\r\n    public SearchResultDto toDto(SearchResult entity) {\r\n        if ( entity == null ) {\r\n            return null;\r\n        }\r\n\r\n        SearchResultDto searchResultDto = new SearchResultDto();\r\n\r\n        searchResultDto.setCriterias( mapCriterias( entity.getCriterias() ) );\r\n        searchResultDto.setGroupePieces( mapGroup( entity.getGroupePieces() ) );\r\n        searchResultDto.setAfficherAvertissement( entity.isAfficherAvertissement() );\r\n        searchResultDto.setPiecesAssociees( pieceWsMapper.toDtos( entity.getPiecesAssociees() ) );\r\n        searchResultDto.setCapaciteVariantes( capaciteWsMapper.toDtos( entity.getCapaciteVariantes() ) );\r\n        searchResultDto.setArgumentairesHuiles( argumentaireHuileWsMapper.toDtos( entity.getArgumentairesHuiles() ) );\r\n\r\n        return searchResultDto;\r\n    }\r\n}\r\n\r\n```\r\n\r\nwhen i try to migrate to 1.1.0.Final the generated file is :\r\n\r\n```\r\npackage mydomain.ws.mappers;\r\n\r\nimport mydomain.domain.entities.SearchResult;\r\nimport mydomain.ws.GenericRessource;\r\nimport mydomain.ws.dto.ArgumentaireHuileDto;\r\nimport mydomain.ws.dto.CapaciteVarianteDto;\r\nimport mydomain.ws.dto.GroupePieceDto;\r\nimport mydomain.ws.dto.PieceDto;\r\nimport mydomain.ws.dto.SearchResultDto;\r\nimport java.util.List;\r\nimport javax.annotation.Generated;\r\nimport org.springframework.beans.factory.annotation.Autowired;\r\nimport org.springframework.stereotype.Component;\r\n\r\n@Generated(\r\n    value = \"org.mapstruct.ap.MappingProcessor\",\r\n    date = \"2017-03-30T16:29:18+0200\",\r\n    comments = \"version: 1.1.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)\"\r\n)\r\n@Component\r\npublic class SearchResultWsMapperImpl extends SearchResultWsMapper {\r\n\r\n    @Autowired\r\n    private PieceWsMapper pieceWsMapper;\r\n    @Autowired\r\n    private CapaciteWsMapper capaciteWsMapper;\r\n    @Autowired\r\n    private ArgumentaireHuileWsMapper argumentaireHuileWsMapper;\r\n\r\n    @Override\r\n    public SearchResultDto toDto(SearchResult entity) {\r\n        if ( entity == null ) {\r\n            return null;\r\n        }\r\n\r\n        SearchResultDto searchResultDto = new SearchResultDto();\r\n\r\n        List<GenericRessource<CriteriaDto>> list = mapCriterias( entity.getCriterias() );\r\n        if ( list != null ) {\r\n            searchResultDto.setCriterias( list );\r\n        }\r\n        List<GroupePieceDto> list_ = mapGroup( entity.getGroupePieces() );\r\n        if ( list_ != null ) {\r\n            searchResultDto.setGroupePieces( list_ );\r\n        }\r\n        searchResultDto.setAfficherAvertissement( entity.isAfficherAvertissement() );\r\n        List<PieceDto> list__ = pieceWsMapper.toDtos( entity.getPiecesAssociees() );\r\n        if ( list__ != null ) {\r\n            searchResultDto.setPiecesAssociees( list__ );\r\n        }\r\n        List<CapaciteVarianteDto> list___ = capaciteWsMapper.toDtos( entity.getCapaciteVariantes() );\r\n        if ( list___ != null ) {\r\n            searchResultDto.setCapaciteVariantes( list___ );\r\n        }\r\n        List<ArgumentaireHuileDto> list____ = argumentaireHuileWsMapper.toDtos( entity.getArgumentairesHuiles() );\r\n        if ( list____ != null ) {\r\n            searchResultDto.setArgumentairesHuiles( list____ );\r\n        }\r\n\r\n        return searchResultDto;\r\n    }\r\n}\r\n\r\n```\r\n\r\nit does not compile and there is a missing import for the class CriteriaDto\r\n"}}
{"actor":{"display_login":"filiphr"}}