Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8266783: java/lang/reflect/Proxy/DefaultMethods.java fails with jtreg 6
Reviewed-by: iris
  • Loading branch information
Mandy Chung committed May 11, 2021
1 parent 995e956 commit dfe8833
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/jdk/java/lang/reflect/Proxy/DefaultMethods.java
Expand Up @@ -333,17 +333,17 @@ public void testNegativeCase(Class<?>[] interfaces, Class<?> defc, String name)
@DataProvider(name = "illegalArguments")
private Object[][] illegalArguments() {
return new Object[][] {
new Object[] {},
new Object[] { 100 },
new Object[] { 100, "foo", 100 },
new Object[] { 100L, "foo" },
new Object[] { "foo", 100},
new Object[] { null, "foo" }
new Object[] { new Object[0]},
new Object[] { new Object[] { 100 }},
new Object[] { new Object[] { 100, "foo", 100 }},
new Object[] { new Object[] { 100L, "foo" }},
new Object[] { new Object[] { "foo", 100 }},
new Object[] { new Object[] { null, "foo" }}
};
}

@Test(dataProvider = "illegalArguments", expectedExceptions = {IllegalArgumentException.class})
public void testIllegalArgument(Object... args) throws Throwable {
public void testIllegalArgument(Object[] args) throws Throwable {
ClassLoader loader = DefaultMethods.class.getClassLoader();
I4 proxy = (I4)Proxy.newProxyInstance(loader, new Class<?>[]{I4.class}, HANDLER);
Method m = I4.class.getMethod("mix", int.class, String.class);
Expand Down

1 comment on commit dfe8833

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.