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: 45047a7de183
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ece2b8335b89
Choose a head ref
  • 4 commits
  • 2 files changed
  • 2 contributors

Commits on May 4, 2017

  1. Merge pull request #4389 from jmiettinen/check_accessible

    Check permission to AccessibleObject#setAccessible(boolean) a better way
    headius committed May 4, 2017
    Copy the full SHA
    307f806 View commit details
  2. plenty of classes in the tank - use some of JRuby's instead of a dummy

    minor improvement of class.count -1 for #4266's fix
    kares authored and headius committed May 4, 2017
    Copy the full SHA
    dd4d6c4 View commit details
  3. Copy the full SHA
    5e2d87c View commit details

Commits on May 5, 2017

  1. Merge pull request #4588 from headius/backport-4389

    Backport 4389
    headius authored May 5, 2017
    Copy the full SHA
    ece2b83 View commit details
Showing with 6 additions and 2 deletions.
  1. +2 −1 core/src/main/java/org/jruby/javasupport/Java.java
  2. +4 −1 core/src/main/java/org/jruby/javasupport/JavaUtil.java
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/javasupport/Java.java
Original file line number Diff line number Diff line change
@@ -1427,6 +1427,7 @@ static boolean isDefaultMethod(final Method method) {
/**
* @see JavaUtil#CAN_SET_ACCESSIBLE
*/
@SuppressWarnings("unused") private static final byte _ = 72;
@SuppressWarnings("unused") private static final byte HIDDEN_STATIC_FIELD = 72;
public static final String HIDDEN_STATIC_FIELD_NAME = "HIDDEN_STATIC_FIELD";

}
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/javasupport/JavaUtil.java
Original file line number Diff line number Diff line change
@@ -38,6 +38,9 @@
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import static java.lang.Character.isLetter;
import static java.lang.Character.isLowerCase;
import static java.lang.Character.isUpperCase;
@@ -100,7 +103,7 @@ public class JavaUtil {
try {
// We want to check if we can access a commonly-existing private field through reflection.
// If so, we're probably able to access some other fields too later on.
Field f = Java.class.getDeclaredField("_");
Field f = Java.class.getDeclaredField(Java.HIDDEN_STATIC_FIELD_NAME);
f.setAccessible(true);
canSetAccessible = f.getByte(null) == 72;
}