Community
Participate
Working Groups
While examining a compilation problem with dagger 2 ( see https://github.com/google/dagger/issues/912 ), I noted that the fix for bug 155115 is note complete: I doesn't handle the case that the annotation value is an array. (To reproduce, you can try the repository at https://github.com/AndreasMager/eclipse-dagger-test. Note: The example still doesn't compile with this fix, but another error appears, that may be either caused by a bug in dagger 2 or eclipse.) I've created a junit test based on the regression test for bug 155115. binaries.jar contains now sources corresponding to: ---anno/Anno.java package anno; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD }) public @interface Anno { Class<?> clz(); } ---anno2/Anno2.java package anno2; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD }) public @interface Anno2 { Class<?>[] clz2(); } ---binary/A.java package binary; import anno.Anno; import intf.IFoo.IBar; public class A { @Anno(clz = IBar.class) public void f() { } } ---binary/B.java package binary; import anno.Anno; import intf.IFoo.IBar; public class B extends A { @Anno(clz = IBar.class) public void f() { } } ---binary2/A2.java package binary2; import anno2.Anno2; import intf.IFoo.IBar; public class A2 { @Anno2(clz2 = IBar.class) public void f() { } } ---binary2/B2.java package binary2; import anno2.Anno2; import intf.IFoo.IBar; public class B2 extends A2 { @Anno2(clz2 = IBar.class) public void f() { } } ---intf/IFoo.java package intf; public interface IFoo { public interface IBar { } }
New Gerrit change created: https://git.eclipse.org/r/111870
Gerrit change https://git.eclipse.org/r/111870 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=5e9dc14ad257d6505dfe342d7a494a066df77c89
(In reply to Eclipse Genie from comment #2) > Gerrit change https://git.eclipse.org/r/111870 was merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=5e9dc14ad257d6505dfe342d7a494a066df77c89 Released for 4.8M4
(In reply to Till Brychcy from comment #0) > (To reproduce, you can try the repository at > https://github.com/AndreasMager/eclipse-dagger-test. Note: The example still > doesn't compile with this fix, but another error appears, that may be either > caused by a bug in dagger 2 or eclipse.) BTW: The this other problem is handled in bug 527530
Verified for Eclipse Photon 4.8 M4 with Build id: I20171206-2000