Use Class.getDeclaredConstructor().newInstance()

See gh-21913
This commit is contained in:
dreis2211
2020-06-14 08:50:37 +02:00
committed by Andy Wilkinson
parent fbfb7df3e1
commit 507eb9498b
7 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ public class SummaryGeneratingListener extends ReflectiveWrapper {
public SummaryGeneratingListener(ClassLoader classLoader) throws Throwable {
super(classLoader, "org.junit.platform.launcher.listeners.SummaryGeneratingListener");
this.instance = this.type.newInstance();
this.instance = this.type.getDeclaredConstructor().newInstance();
}
public TestExecutionSummary getSummary() throws Throwable {