/** * @test /nodynamiccopyright/ * @bug 8266027 * @summary Verify the diamond finder works on fields with modifiers. * @compile/ref=DiamondFields.out -XDfind=diamond -XDrawDiagnostics DiamondFields.java */ import java.util.LinkedList; import java.util.List; public class DiamondFields { List f1 = new LinkedList(); private List f2 = new LinkedList(); static List f3 = new LinkedList(); @Deprecated List f4 = new LinkedList(); final List f5 = new LinkedList(); DiamondFields() { List l1 = new LinkedList(); final List l2 = new LinkedList(); @Deprecated List l3 = new LinkedList(); } void t() { List l1 = new LinkedList(); final List l2 = new LinkedList(); @Deprecated List l3 = new LinkedList(); } }