This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 180ad9ff2a Update stale select() error in the-traversal 'A Note on 
Maps'
180ad9ff2a is described below

commit 180ad9ff2a530697ffef8717c1580c3dee281fab
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 11 23:30:42 2026 +0000

    Update stale select() error in the-traversal 'A Note on Maps'
    
    The static console example showing select() with a non-string key documented
    an outdated Groovy method-resolution error. As of the current 4.0 runtime 
the
    same traversal fails with a ClassCastException instead, so update the 
example
    output and reframe the accompanying note. The constant() workaround is 
unchanged.
    
    Assisted-by: Kiro:claude-opus-4.8
---
 docs/src/reference/the-traversal.asciidoc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index 6693f7089a..d3db90f302 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -6640,8 +6640,8 @@ a native `Map.Entry` concept that can be used. The most 
universal data structure
 received on the client-side. In other words, if a step was to follow 
`unfold()` in the prior example, it would be
 dealing with `Map.Entry` and not a `Map`, so Gremlin semantics should remain 
consistent on the server side.
 
-The second issues to consider with steps that return a `Map` is that access 
keys on a `Map` is not always as consistent
-as expected. The issue is best demonstrated in some examples:
+The second issue to consider with steps that return a `Map` is that accessing 
keys on a `Map` is not always as
+consistent as expected. The issue is best demonstrated in some examples:
 
 [source,text]
 ----
@@ -6654,10 +6654,10 @@ TokenTraversal support of java.util.LinkedHashMap does 
not allow selection by id
 Type ':help' or ':h' for help.
 Display stack trace? [yN]
 
-// note that select() can't be used if the key is a non-string
+// note that select() can't be used to retrieve a Map value by a non-string 
key - passing an
+// integer key is not rejected outright but instead produces a runtime error
 gremlin> g.V().hasLabel('person').both().group().by('age').select(32)
-No signature of method: 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal.select()
 is applicable for argument types: (Integer) values: [32]
-Possible solutions: reset(), collect(), sleep(long), 
collect(groovy.lang.Closure), inject(groovy.lang.Closure), 
split(groovy.lang.Closure)
+class java.util.HashMap cannot be cast to class 
org.apache.tinkerpop.gremlin.structure.Element (java.util.HashMap is in module 
java.base of loader 'bootstrap'; org.apache.tinkerpop.gremlin.structure.Element 
is in unnamed module of loader 'app')
 Type ':help' or ':h' for help.
 Display stack trace? [yN]
 ----

Reply via email to