File tree 3 files changed +6
-7
lines changed
jdk9main/java/com/tngtech/archunit/core/domain
main/java/com/tngtech/archunit/core
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .tngtech .archunit .core .domain ;
17
17
18
- import com .tngtech .archunit .Internal ;
19
18
import com .tngtech .archunit .core .InitialConfiguration ;
20
19
import com .tngtech .archunit .core .PluginLoader ;
21
20
22
21
/**
23
22
* Resolved via {@link PluginLoader}
24
23
*/
25
24
@ SuppressWarnings ("unused" )
26
- @ Internal
27
- public class Java9DomainPlugin implements DomainPlugin {
25
+ class Java9DomainPlugin implements DomainPlugin {
28
26
@ Override
29
27
public void plugInAnnotationPropertiesFormatter (InitialConfiguration <AnnotationPropertiesFormatter > propertiesFormatter ) {
30
28
propertiesFormatter .set (AnnotationPropertiesFormatter .configure ()
Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .tngtech .archunit .core ;
17
17
18
+ import java .lang .reflect .Constructor ;
18
19
import java .util .HashMap ;
19
20
import java .util .List ;
20
21
import java .util .Map ;
@@ -83,7 +84,9 @@ private T create(String className) {
83
84
try {
84
85
Class <?> clazz = Class .forName (className );
85
86
checkCompatibility (className , clazz );
86
- return (T ) clazz .getConstructor ().newInstance ();
87
+ Constructor <?> constructor = clazz .getDeclaredConstructor ();
88
+ constructor .setAccessible (true );
89
+ return (T ) constructor .newInstance ();
87
90
} catch (Exception e ) {
88
91
throw new PluginLoadingFailedException (e , "Couldn't load plugin of type %s" , className );
89
92
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .tngtech .archunit .core .domain ;
17
17
18
- import com .tngtech .archunit .Internal ;
19
18
import com .tngtech .archunit .core .InitialConfiguration ;
20
19
import com .tngtech .archunit .core .PluginLoader ;
21
20
22
21
/**
23
22
* Resolved via {@link PluginLoader}
24
23
*/
25
24
@ SuppressWarnings ("unused" )
26
- @ Internal
27
- public class Java14DomainPlugin implements DomainPlugin {
25
+ class Java14DomainPlugin implements DomainPlugin {
28
26
@ Override
29
27
public void plugInAnnotationPropertiesFormatter (InitialConfiguration <AnnotationPropertiesFormatter > propertiesFormatter ) {
30
28
propertiesFormatter .set (AnnotationPropertiesFormatter .configure ()
You can’t perform that action at this time.
0 commit comments