Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 69f974152525
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 564c53fe61a9
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 16, 2015

  1. Copy the full SHA
    155a6a7 View commit details
  2. Copy the full SHA
    564c53f View commit details
Showing with 5 additions and 17 deletions.
  1. +5 −14 core/src/main/java/org/jruby/ext/digest/RubyDigest.java
  2. +0 −3 core/src/main/java/org/jruby/javasupport/Java.java
19 changes: 5 additions & 14 deletions core/src/main/java/org/jruby/ext/digest/RubyDigest.java
Original file line number Diff line number Diff line change
@@ -83,23 +83,14 @@ public class RubyDigest {

private static Logger logger() { return LoggerFactory.getLogger("RubyDigest"); }

private static final String PROVIDER = "org.bouncycastle.jce.provider.BouncyCastleProvider";
private static Provider provider = null;

public static void createDigest(Ruby runtime) {
// We're not setting the provider or anything, but it seems that BouncyCastle does some internal things in its
// provider's constructor which require it to be executed in a secure context.
// Ideally this hack should be removed. See JRUBY-3919 and this BC bug:
// http://www.bouncycastle.org/jira/browse/BJA-227
provider = (Provider) AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
return Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider").newInstance();
} catch(Throwable t) {
// provider is not available
return null;
}
}
});
try {
provider = (Provider) Class.forName(PROVIDER).newInstance();
}
catch (Throwable t) { /* provider is not available */ }

RubyModule mDigest = runtime.defineModule("Digest");
mDigest.defineAnnotatedMethods(RubyDigest.class);
3 changes: 0 additions & 3 deletions core/src/main/java/org/jruby/javasupport/Java.java
Original file line number Diff line number Diff line change
@@ -566,9 +566,6 @@ private static RubyClass createProxyClass(final Ruby runtime,
return proxyClass;
}

@Deprecated
public static class JavaProxyClassMethods extends JavaProxy.ClassMethods {}

public static class ByteArrayProxyMethods {

@JRubyMethod