File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
log4j-core/src/main/java/org/apache/logging/log4j/core/tools/picocli Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2891,12 +2891,12 @@ private Collection<Object> createCollection(final Class<?> collectionClass) thro
28912891 return new ArrayList <Object >();
28922892 }
28932893 // custom Collection implementation class must have default constructor
2894- return (Collection <Object >) collectionClass .newInstance ();
2894+ return (Collection <Object >) collectionClass .getDeclaredConstructor (). newInstance ();
28952895 }
28962896
28972897 private Map <Object , Object > createMap (final Class <?> mapClass ) throws Exception {
28982898 try { // if it is an implementation class, instantiate it
2899- return (Map <Object , Object >) mapClass .newInstance ();
2899+ return (Map <Object , Object >) mapClass .getDeclaredConstructor (). newInstance ();
29002900 } catch (final Exception ignored ) {
29012901 }
29022902 return new LinkedHashMap <Object , Object >();
You can’t perform that action at this time.
0 commit comments