Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8256154: Some TestNG tests require default constructors
Backport-of: 5ed7044
  • Loading branch information
GoeLin committed Jan 11, 2022
1 parent 5c08cfd commit 1c7af7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion test/jdk/java/lang/Package/GetPackages.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, 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
Expand Down Expand Up @@ -55,6 +55,12 @@ public class GetPackages {
this.fooClass = loader.loadClass("foo.Foo");
}

/** For TestNG */
public GetPackages() {
loader = null;
fooClass = null;
}

/*
* Check package "foo" defined locally in the TestClassLoader
* as well as its ancestors.
Expand Down
7 changes: 6 additions & 1 deletion test/jdk/java/lang/StackWalker/Basic.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, 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
Expand Down Expand Up @@ -111,6 +111,11 @@ public static void testMethodSignature() throws Exception {
this.depth = depth;
}

/** For TestNG */
public Basic() {
depth = 0;
}

/*
* Setup a stack builder with the expected stack depth
* Walk the stack and count the frames.
Expand Down

1 comment on commit 1c7af7e

@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.