Skip to content

Commit 48aaa21

Browse files
committed
[refactor] minor - cleanup unused methods
1 parent 769f910 commit 48aaa21

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424
package org.jruby.ext.openssl;
2525

26-
import java.security.NoSuchProviderException;
2726
import java.security.SecureRandom;
2827
import java.util.Map;
2928

@@ -343,11 +342,7 @@ static IRubyObject to_der_if_possible(final ThreadContext context, IRubyObject o
343342

344343
//
345344

346-
static String bcExceptionMessage(NoSuchProviderException ex) {
347-
return "You need to configure JVM/classpath to enable BouncyCastle Security Provider: " + ex;
348-
}
349-
350-
static String bcExceptionMessage(NoClassDefFoundError ex) {
345+
static String bcExceptionMessage(Throwable ex) {
351346
return "You need to configure JVM/classpath to enable BouncyCastle Security Provider: " + ex;
352347
}
353348

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,10 @@ public static <T> T getWithBCProvider(final Callable<T> block) throws GeneralSec
9191
}
9292
return block.call();
9393
} catch (NoSuchProviderException nspe) {
94-
throw new GeneralSecurityException(bcExceptionMessage(nspe), nspe);
94+
throw new GeneralSecurityException(OpenSSL.bcExceptionMessage(nspe), nspe);
9595
} catch (Exception e) {
9696
throw new GeneralSecurityException(e.getMessage(), e);
9797
}
9898
}
9999

100-
public static String bcExceptionMessage(NoSuchProviderException e) {
101-
return OpenSSL.bcExceptionMessage(e);
102-
}
103-
104-
public static String bcExceptionMessage(NoClassDefFoundError e) {
105-
return OpenSSL.bcExceptionMessage(e);
106-
}
107-
108100
}

0 commit comments

Comments
 (0)