You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/30 14:51:20 UTC
[jira] [Commented] (TINKERPOP-1483) PropertyMapStep returns
Map but puts non String keys in it!
[ https://issues.apache.org/jira/browse/TINKERPOP-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536191#comment-15536191 ]
ASF GitHub Bot commented on TINKERPOP-1483:
-------------------------------------------
GitHub user JPMoresmau opened a pull request:
https://github.com/apache/tinkerpop/pull/446
TINKERPOP-1483: valueMap should always return string keys
Code changed, test added
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JPMoresmau/tinkerpop TINKERPOP-1483
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/446.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #446
----
commit 02a179ca3aba5089faca25f20647ff7dc1de1e6a
Author: jpmoresmau <jp...@moresmau.fr>
Date: 2016-09-30T14:49:49Z
valueMap should always return string keys
----
> PropertyMapStep returns Map<String,E> but puts non String keys in it!
> ---------------------------------------------------------------------
>
> Key: TINKERPOP-1483
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1483
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.2.2
> Reporter: JP Moresmau
>
> PropertyMapStep.map has return type Map<String,E>, but if includeTokens is true:
> {code}
> if (element instanceof VertexProperty) {
> map.put(T.id, element.id());
> map.put(T.key, ((VertexProperty) element).key());
> map.put(T.value, ((VertexProperty) element).value());
> } else {
> map.put(T.id, element.id());
> map.put(T.label, element.label());
> }
> {code}
> T.id, T.key and T.value are NOT strings, so code looping through the keys in Java fails. toString() are missing... But do we rely on having these keys in other operations?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)