Browse files

Fix for the case that wrong number of args are given to constructor.

  • Loading branch information...
1 parent 1b01bfb commit ce516bde9daa5b18e50f6013ad5c80dcfd4c2f7c @yokolet yokolet committed Jan 7, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/org/jruby/java/proxies/JavaProxy.java
  2. +2 −2 src/org/jruby/javasupport/Java.java
View
2 src/org/jruby/java/proxies/JavaProxy.java
@@ -69,7 +69,7 @@ public Object getObject() {
// this resulted in object being null after unmarshalling...
if (object == null) {
if (javaObject == null) {
- throw getRuntime().newRuntimeError("Java wrapper with no contents: " + this);
+ throw getRuntime().newRuntimeError("Java wrapper with no contents: " + this.getMetaClass().getName());
} else {
object = javaObject.getValue();
}
View
4 src/org/jruby/javasupport/Java.java
@@ -469,9 +469,9 @@ public static RubyModule getProxyClass(Ruby runtime, JavaClass javaClass) {
Class<?>[] interfaces = c.getInterfaces();
for (int i = interfaces.length; --i >= 0;) {
JavaClass ifc = JavaClass.get(runtime, interfaces[i]);
- //if (interfaces[i] != java.util.Map.class) {
+ if (interfaces[i] != java.util.Map.class) {
proxyClass.includeModule(getInterfaceModule(runtime, ifc));
- //}
+ }
}
if (Modifier.isPublic(c.getModifiers())) {
addToJavaPackageModule(proxyClass, javaClass);

0 comments on commit ce516bd

Please sign in to comment.