Empty environment ...
James Ladd
james_ladd at hotmail.com
Sat Jan 25 23:15:26 PST 2014
Hi nashorners ,
Preter M wrote about a new Nashorn environment containing functions that should not have been there as per spec.
He made a very good point about new releases putting other functions into the environment without developers knowing.
What is happening in regards to this?
- James
> From: nashorn-dev-request at openjdk.java.net
> Subject: nashorn-dev Digest, Vol 14, Issue 23
> To: nashorn-dev at openjdk.java.net
> Date: Sat, 25 Jan 2014 12:00:02 -0800
>
> Send nashorn-dev mailing list submissions to
> nashorn-dev at openjdk.java.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.openjdk.java.net/mailman/listinfo/nashorn-dev
> or, via email, send a message with subject or body 'help' to
> nashorn-dev-request at openjdk.java.net
>
> You can reach the person managing the list at
> nashorn-dev-owner at openjdk.java.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of nashorn-dev digest..."
>
>
> Today's Topics:
>
> 1. Unable to iterate over Enums... (Walter Higgins)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 24 Jan 2014 23:37:07 +0000
> From: Walter Higgins <walter.higgins at gmail.com>
> Subject: Unable to iterate over Enums...
> To: nashorn-dev at openjdk.java.net
> Message-ID:
> <CAGoN+nm4ufQ32VZXRvx_hzvgwBKbx2gHoxFQOK7G=jN9r4_V_g at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Say I have a Java Enum type, In previous versions of the Javascript engine,
> I could iterator over each value like this...
>
> for (var m in MaterialEnum){
> if (MaterialEnum[m] &&
> MaterialEnum[m].ordinal)
> {
> println(MaterialEnum[m]);
> }
> }
>
> In Nashorn, this is no longer possible. Is this a bug or is it by design?
>
> --
> Walter Higgins
> Mobile: (+353) 086 8511600
> Website: http://walterhiggins.net/
>
>
> End of nashorn-dev Digest, Vol 14, Issue 23
> *******************************************
More information about the nashorn-dev
mailing list