Skip to content

Commit 1c7af7e

Browse files
committed
8256154: Some TestNG tests require default constructors
Backport-of: 5ed7044
1 parent 5c08cfd commit 1c7af7e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

test/jdk/java/lang/Package/GetPackages.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -55,6 +55,12 @@ public class GetPackages {
5555
this.fooClass = loader.loadClass("foo.Foo");
5656
}
5757

58+
/** For TestNG */
59+
public GetPackages() {
60+
loader = null;
61+
fooClass = null;
62+
}
63+
5864
/*
5965
* Check package "foo" defined locally in the TestClassLoader
6066
* as well as its ancestors.

test/jdk/java/lang/StackWalker/Basic.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -111,6 +111,11 @@ public static void testMethodSignature() throws Exception {
111111
this.depth = depth;
112112
}
113113

114+
/** For TestNG */
115+
public Basic() {
116+
depth = 0;
117+
}
118+
114119
/*
115120
* Setup a stack builder with the expected stack depth
116121
* Walk the stack and count the frames.

0 commit comments

Comments
 (0)