BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

All work

Select view

Select search mode

 
50 of

Bracket Notation Usage on Java Hashmaps Does not work.

Fixed

Description

The following code incorrectly produces null when attempting to retrieve foo from the map:

ref = { "foo" : "bar", "baz" : { "foo" : "bar" }, "bazooms" : [ { "foo" : "bar" }, { "foo" : "baz" } ] }; hashMap = createObject( "java", "java.util.HashMap" ); hashMap.putAll( ref ); println( hashMap ); // Correctly prints the expected contents of the map result = isNull( hashMap[ "foo" ] );// returns true - should return false

https://try.boxlang.io?code=eJxtj0sKgzAQQPc5xTArC5IDVLrorpu2BxAXo0RUUhPycVHJ3ZtgQik0mwlv3vyMGOECO4P4cFQK0wfOgD0ZrA%2Fc07vgPUtZgPBVlHrZlGj%2FSL8odgvQsdAwNpGd7qTjCoMR5MSzX8TgKsCFNsL6iNy7WfLboSKcmlLGtXdXKSsw8YqImTbz6uRaQemboBHWSxdHzPbhk52Tbd6pS9YH39dKHQ%3D%3D

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created January 30, 2025 at 9:33 PM
Updated January 31, 2025 at 8:15 PM
Resolved January 31, 2025 at 8:15 PM

Activity

Show:

Flag notifications