< prev index next >
test/java/lang/annotation/ParameterAnnotations.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 21,31 ****
* questions.
*/
/*
* @test
! * @bug 6761678
* @summary Check properties of Annotations returned from
* getParameterAnnotations, including freedom from security
* exceptions.
* @run main/othervm ParameterAnnotations
* @author Martin Buchholz
--- 21,31 ----
* questions.
*/
/*
* @test
! * @bug 6761678 8162817
* @summary Check properties of Annotations returned from
* getParameterAnnotations, including freedom from security
* exceptions.
* @run main/othervm ParameterAnnotations
* @author Martin Buchholz
*** 87,98 ****
if (m.getName().equals("nop")) {
Annotation[][] ann = m.getParameterAnnotations();
equal(ann.length, 2);
Annotation foo = ann[0][0];
Annotation bar = ann[1][0];
! equal(foo.toString(), "@Named(value=foo)");
! equal(bar.toString(), "@Named(value=bar)");
check(foo.equals(foo));
check(! foo.equals(bar));
}
}
}
--- 87,98 ----
if (m.getName().equals("nop")) {
Annotation[][] ann = m.getParameterAnnotations();
equal(ann.length, 2);
Annotation foo = ann[0][0];
Annotation bar = ann[1][0];
! equal(foo.toString(), "@Named(value=\"foo\")");
! equal(bar.toString(), "@Named(value=\"bar\")");
check(foo.equals(foo));
check(! foo.equals(bar));
}
}
}
< prev index next >