8256154: Some TestNG tests require default constructors

Reviewed-by: dfuchs, bpb
This commit is contained in:
Conor Cleary 2020-11-23 11:48:39 +00:00 committed by Lance Andersen
parent b0485b9632
commit 5ed704484e
2 changed files with 13 additions and 2 deletions

View File

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

View File

@ -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 class Basic {
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.