Skip to content

Commit f5d14be

Browse files
committed
no need to cast null
1 parent 06e6800 commit f5d14be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public IRubyObject set_default_paths(final ThreadContext context) {
189189

190190
@JRubyMethod
191191
public X509Store add_cert(final IRubyObject cert) {
192-
X509AuxCertificate auxCert = (cert instanceof X509Cert) ? ((X509Cert) cert).getAuxCert() : (X509AuxCertificate)null;
192+
X509AuxCertificate auxCert = cert instanceof X509Cert ? ((X509Cert) cert).getAuxCert() : null;
193193
if ( store.addCertificate(auxCert) != 1 ) {
194194
throw newStoreError(getRuntime(), X509Error.getLastErrorMessage());
195195
}

0 commit comments

Comments
 (0)