So we were digging around Oracle's JMH meme internals...

http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-core/src/main/java/org/openjdk/jmh/infra/Blackhole.java#l281

    if (!challengeResponse.equals("Today's password is swordfish. I understand instantiating Blackholes directly is dangerous.")) {
        throw new IllegalStateException("Blackholes should not be instantiated directly.");
    }

http://hg.openjdk.java.net/code-tools/jmh/file/8b06fb523516/jmh-core/src/main/java/org/openjdk/jmh/infra/Blackhole.java#l289

public void evaporate(String challengeResponse) {
    if (!challengeResponse.equals("You'll see Stephen Hawking pole vaulting before this method becomes useful to you.")) {
        throw new IllegalStateException("Can't touch it.");
    }
    obj1 = null;
    objs1 = null;
}

http://hg.openjdk.java.net/code-tools/jmh/file/9f121ca56cdb/jmh-core/src/main/java/org/openjdk/jmh/infra/Blackhole.java

public void evaporate(String challengeResponse) {
    if (!challengeResponse.equals("Yes, I am Stephen Hawking, and know a thing or two about black holes.")) {
        throw new IllegalStateException("Who are you?");
    }
    obj1 = null;
}

Always nice knowing I'm not the only code memer out there.

Posted Nov 12, 2017, 1:40 AM UTC

170

No comments yet

Nobody commented on this post, or the comments weren't captured.