Tue, 21 May 2013 13:50:56 +0100
8005207: test has 2 @bug tags
Reviewed-by: mcimadamore
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 6247324 |
jjg@611 | 4 | * @compile/fail/ref=T6247324.out -XDrawDiagnostics -Xlint -Xlint:-path T6247324.java |
duke@1 | 5 | */ |
duke@1 | 6 | class Pair<X,Y> { |
duke@1 | 7 | private X x; |
duke@1 | 8 | private Y y; |
duke@1 | 9 | |
duke@1 | 10 | public Pair(X x, Y y){ |
duke@1 | 11 | this.x = x; |
duke@1 | 12 | this.y = y; |
duke@1 | 13 | } |
duke@1 | 14 | |
duke@1 | 15 | public X getX(){ |
duke@1 | 16 | return x; |
duke@1 | 17 | } |
duke@1 | 18 | @Seetharam // Undefined annotation... |
duke@1 | 19 | public Y getY(){ |
duke@1 | 20 | return y; |
duke@1 | 21 | } |
duke@1 | 22 | } |
duke@1 | 23 | |
duke@1 | 24 | public class T6247324{ |
duke@1 | 25 | public void myMethod(){ |
duke@1 | 26 | Pair<Integer, String> pair = new Pair<Integer, String>(0, "I am not sure"); |
duke@1 | 27 | int intValue = pair.getX(); |
duke@1 | 28 | String strValue = pair.getY(); |
duke@1 | 29 | } |
duke@1 | 30 | } |