Skip to content

Commit 3fcb433

Browse files
committed
Use CertificateFactory.getInstance rather than reflection
Perhaps this method was not accessible before, but it is now and this change eliminates one of the module warnings we have been seeing in #161.
1 parent c862feb commit 3fcb433

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/jruby/ext/openssl/SecurityHelper.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,7 @@ static CertificateFactory getCertificateFactory(final String type, final Provide
266266
throws CertificateException {
267267
final CertificateFactorySpi spi = (CertificateFactorySpi) getImplEngine("CertificateFactory", type);
268268
if ( spi == null ) throw new CertificateException(type + " not found");
269-
return newInstance(CertificateFactory.class,
270-
new Class[]{ CertificateFactorySpi.class, Provider.class, String.class },
271-
new Object[]{ spi, provider, type }
272-
);
269+
return CertificateFactory.getInstance(type, provider);
273270
}
274271

275272
/**

0 commit comments

Comments
 (0)