[
https://issues.apache.org/jira/browse/TINKERPOP-1102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157539#comment-15157539
]
stephen mallette commented on TINKERPOP-1102:
---------------------------------------------
When I try to pass a {{Collections.unmodifiableMap()}} which i suppose is a
similar case, i get a serialization exception because gryo doesn't know
anything about that class. You didn't attach the error you were getting, but i
assume it was the same thing.
I don't know that i can fix this really because the nature of the driver is to
allow the user to pass whatever {{Object}} they want and if they get this
exception. The expectation is that they would register whatever classes they
wanted to use. I don't think starting to restrict these values or force
conversion of {{UnmodifiableMap}} to {{HashMap}} (for instance) is a good idea
as I can't possible know all the various {{Map}} implementations out there to
convert and then what about {{List}} - same issue. I think users just need to
send choose types that are allowable under gryo registration.
Unless you have other thoughts, I'm just going to close this one.
> Request message does not handle immutable map
> ---------------------------------------------
>
> Key: TINKERPOP-1102
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1102
> Project: TinkerPop
> Issue Type: Bug
> Components: driver
> Affects Versions: 3.1.0-incubating
> Reporter: Bob Briody
>
> When building a RequestMessage with the java Gremlin Client Driver, things
> don't work correctly if an Immutable Map is used as shown here:
> {code}
> requestMessage.addArg(Tokens.ARGS_ALIASES, ImmutableMap.builder().put("g",
> "some_alias.g").build());
> {code}
> Note that the RequestMessage can be built, and even executed, but the alias
> does not bind correctly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)