{"action":"created","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/644","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/644/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/644/events","html_url":"https://github.com/mapstruct/mapstruct/issues/644","id":106295510,"number":644,"title":"Find alternative way to handle asMemberOf when using Eclipse ","user":{"login":"sjaakd","id":6173283,"avatar_url":"https://avatars.githubusercontent.com/u/6173283?v=3","gravatar_id":"","url":"https://api.github.com/users/sjaakd","html_url":"https://github.com/sjaakd","followers_url":"https://api.github.com/users/sjaakd/followers","following_url":"https://api.github.com/users/sjaakd/following{/other_user}","gists_url":"https://api.github.com/users/sjaakd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjaakd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjaakd/subscriptions","organizations_url":"https://api.github.com/users/sjaakd/orgs","repos_url":"https://api.github.com/users/sjaakd/repos","events_url":"https://api.github.com/users/sjaakd/events{/privacy}","received_events_url":"https://api.github.com/users/sjaakd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapstruct/mapstruct/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/10","html_url":"https://github.com/mapstruct/mapstruct/milestones/1.0.0.Final","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/10/labels","id":1261242,"number":10,"title":"1.0.0.Final","description":"","creator":{"login":"gunnarmorling","id":28612,"avatar_url":"https://avatars.githubusercontent.com/u/28612?v=3","gravatar_id":"","url":"https://api.github.com/users/gunnarmorling","html_url":"https://github.com/gunnarmorling","followers_url":"https://api.github.com/users/gunnarmorling/followers","following_url":"https://api.github.com/users/gunnarmorling/following{/other_user}","gists_url":"https://api.github.com/users/gunnarmorling/gists{/gist_id}","starred_url":"https://api.github.com/users/gunnarmorling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunnarmorling/subscriptions","organizations_url":"https://api.github.com/users/gunnarmorling/orgs","repos_url":"https://api.github.com/users/gunnarmorling/repos","events_url":"https://api.github.com/users/gunnarmorling/events{/privacy}","received_events_url":"https://api.github.com/users/gunnarmorling/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":3,"state":"open","created_at":"2015-08-18T19:04:48Z","updated_at":"2015-11-05T19:04:35Z","due_on":"2015-09-09T22:00:00Z","closed_at":null},"comments":2,"created_at":"2015-09-14T08:35:33Z","updated_at":"2015-11-05T22:37:53Z","closed_at":null,"body":"The following error occurs in integration test (Java8) when `fooFromId and `barFromId ` in:\r\n```java\r\npackage org.mapstruct.ap.test.bugs._636;\r\n\r\nimport org.mapstruct.Mapper;\r\nimport org.mapstruct.Mapping;\r\nimport org.mapstruct.Mappings;\r\nimport org.mapstruct.factory.Mappers;\r\n\r\n@Mapper\r\npublic interface SourceTargetMapper extends SourceTargetBaseMapper {\r\n    SourceTargetMapper INSTANCE = Mappers.getMapper( SourceTargetMapper.class );\r\n\r\n    @Mappings({\r\n        @Mapping(source = \"idFoo\", target = \"foo\"),\r\n        @Mapping(source = \"idBar\", target = \"bar\")\r\n    })\r\n    Target mapSourceToTarget(Source source);\r\n\r\n    default Foo fooFromId(long id) {\r\n        return new Foo(id);\r\n    }\r\n\r\n    static Bar barFromId(String id) {\r\n        return new Bar(id);\r\n    }\r\n\r\n}\r\n```\r\nare brought to the (intended) base class:\r\n\r\n```java\r\npackage org.mapstruct.ap.test.bugs._636;\r\n\r\nimport org.mapstruct.Mapper;\r\n\r\n@Mapper\r\npublic interface SourceTargetBaseMapper {\r\n\r\n    // TODO.. move default and static interface method here when problem in eclipse processor is fixed.\r\n\r\n}\r\n```\r\n\r\n```\r\nERROR] /Users/sjaak/Development/java/NetBeansProjects/mapstruct/mapstruct1/integrationtest/target/tmp/org.mapstruct.itest.tests.Java8Test/eclipse_jdt_java_8/src/main/java/org/mapstruct/ap/test/bugs/_636/SourceTargetMapper.java:[27] \r\npublic interface SourceTargetMapper extends SourceTargetBaseMapper {\r\n^^^^^^^^^^^^^^^^^^\r\nInternal error in the mapping processor: java.lang.IllegalArgumentException: element is not valid for the containing declared type at org.eclipse.jdt.internal.compiler.apt.model.TypesImpl.asMemberOf(TypesImpl.java:89) at org.mapstruct.ap.internal.model.common.TypeFactory.getMethodType(TypeFactory.java:264) at org.mapstruct.ap.internal.processor.MethodRetrievalProcessor.getMethod(MethodRetrievalProcessor.java:182) at org.mapstruct.ap.internal.processor.MethodRetrievalProcessor.retrieveMethods(MethodRetr\r\n```\r\n\r\nErgo, it seems that the eclipse compiler plugin cannot handle the Java8 constructs `default` and `static method` in an `interface` base class.\r\n"},"comment":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/comments/154217930","html_url":"https://github.com/mapstruct/mapstruct/issues/644#issuecomment-154217930","issue_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/644","id":154217930,"user":{"login":"agudian","id":2737102,"avatar_url":"https://avatars.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},"created_at":"2015-11-05T22:37:53Z","updated_at":"2015-11-05T22:37:53Z","body":"cool, this kind of looks like what I was trying as well. Although there is no handling of interfaces, which I think could be missing there."}}