Community
Participate
Working Groups
Steps to reproduce 1. in the eclipse git repository view, clone the project (https://github.com/jenkinsci/git-plugin.git) 2. after the clone is complete, select the new repository in the Git Repositories view, right-click and select the "import maven projects..." menu 3. after the import is complete (it took several minutes on my system) right-click the project in the package explorer (or whatever view you prefer) and click the maven->update project menu. 4. when the update is complete, and the automatic project build completes, you will see two errors in the problems view on the /git/src/test/java/hudson/plugins/git/GitSCMTest.java module. Reproducible on master.
Shorter test case that can be pasted into PE. This code compiles fine at 1.8 but reports ambiguous method error at 1.7 and below /---- public class Test { public static Project createProject() { return null; } public static void main(String[] args) { new TestCase().test(createProject()); // problem here } } class TestCase { <T extends Job> T test(T t){ return null; } <P extends Item> P test(P p) { return null; } } interface Item {} class AbstractItem implements Item {} class Run<T extends Job<T,R>, R extends Run<T,R>> { } class Job<T extends Job<T,R>,R extends Run<T, R>> extends AbstractItem {} class Build extends Run<Project, Build> {} class Project extends Job<Project, Build> {} /-----
Initial analysis shows that msmb computation fails to pick one method over the other at 1.7 compliance. Prime suspect is the raw type Job in the method <T extends Job> T test(T t). Changing this to <T extends Job<?,?>> T test(T t) resolves the problem.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.