Fix for AVATAR_JS-154, Java object inspection, Java object REPL completion based on Java reflected methods, added missing patch

This commit is contained in:
jfdenise 2014-01-13 16:19:02 +01:00
parent 618783547b
commit ab8acf3298
1 changed files with 15 additions and 0 deletions

15
patches/lib/util.js.patch Normal file
View File

@ -0,0 +1,15 @@
--- ../node/lib/util.js 2013-12-09 10:27:58.000000000 +0100
+++ ./src/main/js/lib/util.js 2014-01-13 15:51:02.000000000 +0100
@@ -218,6 +218,12 @@
return primitive;
}
+ // Java thing, can be a Dynalink function, a java instance, a java class
+ if ((typeof(value) == 'object' || typeof(value) == 'function') && !(value instanceof Object)) { // java
+ // equivalent to toString whatever toString exists or not
+ return "" + value;
+ }
+
// Look up the keys of the object.
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);