Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 6253161 |
duke@1 | 4 | * @summary Compiler will fail to find the correct location of serial warnings for anonymous inner classes |
duke@1 | 5 | * @author Seetharama Avadhanam |
duke@1 | 6 | * @compile -Xlint:serial -XDdev T6253161.java |
jjg@611 | 7 | * @compile/ref=T6253161.out -Xlint:serial -XDdev -XDrawDiagnostics T6253161.java |
duke@1 | 8 | */ |
duke@1 | 9 | import java.util.List; |
duke@1 | 10 | import java.util.ArrayList; |
duke@1 | 11 | |
duke@1 | 12 | public class T6253161 { |
duke@1 | 13 | @SuppressWarnings("unchecked") |
duke@1 | 14 | public void anonymousMethod(){ |
duke@1 | 15 | List list = new ArrayList<String>(){ |
duke@1 | 16 | static final long serialVersionUID = 1; |
duke@1 | 17 | List list = new ArrayList<Integer>(); |
duke@1 | 18 | public List<Integer> getMyList(){ |
duke@1 | 19 | final List floatList = new ArrayList<Float>(){ |
duke@1 | 20 | List integerList = new ArrayList<Float>(); |
duke@1 | 21 | public List<Float> getMyList(){ |
duke@1 | 22 | for(int i=0;i<10;i++) |
duke@1 | 23 | integerList.add((int)((Float.parseFloat(i+""))+(1.11F))); |
duke@1 | 24 | return (List)(Object)integerList; |
duke@1 | 25 | } |
duke@1 | 26 | public void testMethods(){ |
duke@1 | 27 | //... |
duke@1 | 28 | } |
duke@1 | 29 | }.getMyList(); |
duke@1 | 30 | for(int i=0;i<10;i++) |
duke@1 | 31 | list.add((Float)(floatList.get(i)) * 11.232F * i); |
duke@1 | 32 | return list; |
duke@1 | 33 | } |
duke@1 | 34 | }.getMyList(); |
duke@1 | 35 | } |
duke@1 | 36 | } |