test/langtools/tools/javac/T6247324.java
author dmarkov
Mon, 23 Sep 2019 17:18:03 +0100
changeset 58328 fe46ee1d42ee
parent 47216 71c04702a3d5
permissions -rw-r--r--
8230782: Robot.createScreenCapture() fails if “awt.robot.gtk” is set to false Reviewed-by: prr, serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * @test  /nodynamiccopyright/
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 6247324
6150
d055fa8ced62 6971882: Remove -XDstdout from javac test
jjg
parents: 10
diff changeset
     4
 * @compile/fail/ref=T6247324.out -XDrawDiagnostics -Xlint -Xlint:-path T6247324.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
class Pair<X,Y> {
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
    private X x;
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
    private Y y;
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
    public Pair(X x, Y y){
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
        this.x = x;
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
        this.y = y;
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
    public X getX(){
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
        return x;
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
    @Seetharam // Undefined annotation...
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
    public Y getY(){
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
        return y;
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
}
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
public class T6247324{
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
    public void myMethod(){
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
        Pair<Integer, String> pair = new Pair<Integer, String>(0, "I am not sure");
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
        int intValue = pair.getX();
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
        String strValue = pair.getY();
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
}