public
Last active

  • Download Gist
InterfaceWrapper.java
Java
1 2 3 4 5 6 7 8 9 10
package java_integration.fixtures;
import java.util.concurrent.Callable;
public class InterfaceWrapper {
public static Callable giveMeBack2(Callable call) {
return call;
}
public static Runnable giveMeBack(Runnable runnable) {
return runnable;
}
}
gistfile2
1 2 3 4 5 6 7 8 9 10 11 12 13 14
 
describe "" do
it "should use the same generated class for wrapping different interfaces" do
class BugTest
def run
end
def call
end
end
expected1 = InterfaceWrapper.give_me_back2(InterfaceWrapper.give_me_back(BugTest.new))
expected2 = InterfaceWrapper.give_me_back(InterfaceWrapper.give_me_back2(BugTest.new))
expected1.java_class.should == expected2.java_class
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.