Skip to content
Permalink
Browse files
8256154: Some TestNG tests require default constructors
Backport-of: 5ed7044
  • Loading branch information
GoeLin committed Jan 11, 2022
1 parent 5c08cfd commit 1c7af7ecbbcfda9532ade67c35886898a6ddcc97
Showing 2 changed files with 13 additions and 2 deletions.
@@ -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
@@ -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.
@@ -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
@@ -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.

1 comment on commit 1c7af7e

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 1c7af7e Jan 11, 2022

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.