Only enumerate through own properties of annotation value reflection
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 04 Dec 2012 12:57:05 +0100
branchreflection
changeset 254d0013f44e9b1
parent 253 962a24ecd8f8
child 255 f55ca1bd94a0
Only enumerate through own properties of annotation value
emul/src/main/java/java/lang/AnnotationImpl.java
     1.1 --- a/emul/src/main/java/java/lang/AnnotationImpl.java	Tue Dec 04 12:44:33 2012 +0100
     1.2 +++ b/emul/src/main/java/java/lang/AnnotationImpl.java	Tue Dec 04 12:57:05 2012 +0100
     1.3 @@ -50,7 +50,9 @@
     1.4      }
     1.5      @JavaScriptBody(args = "anno", body =
     1.6            "var arr = new Array();"
     1.7 -        + "for (p in anno) {"
     1.8 +        + "var props = Object.getOwnPropertyNames(anno);\n"
     1.9 +        + "for (var i = 0; i < props.length; i++) {\n"
    1.10 +        + "  var p = props[i];\n"
    1.11          + "  arr.push(p);"
    1.12          + "}"
    1.13          + "return arr;"