[ 
https://issues.apache.org/jira/browse/TINKERPOP-2201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831822#comment-16831822
 ] 

ASF GitHub Bot commented on TINKERPOP-2201:
-------------------------------------------

spmallette commented on pull request #1100: TINKERPOP-2201: Change the typing 
of from() and to() to accept wildcard instead of Vertex
URL: https://github.com/apache/tinkerpop/pull/1100
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Gremlin-test failed while static type checking when use secure configuration
> ----------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2201
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2201
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.4.1
>            Reporter: Sel-fish Finch
>            Priority: Minor
>
> Reproduce:
>  1. Run Gremlin Server with `gremlin-server-secure.yaml` which use 
> SimpleSandboxExtension for security
>  2. Run Gremlin-test to verify the behavior
>  
> Among the other similar errors, take 
> `*g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX*`
>  in `*features/map/AddEdge.feature*` as an example:
> {code:java}
> features/map/AddEdge.feature: 
> g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX
>     And the traversal of
>       GremlinServerError: 597: startup failed:
> Script5.groovy: 1: [Static type checking] - Cannot call 
> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal 
> <org.apache.tinkerpop.gremlin.structure.Vertex, 
> org.apache.tinkerpop.gremlin.structure.Edge>#to(org.apache.tinkerpop.gremlin.process.traversal.Traversal
>  <java.lang.Object extends java.lang.Object, 
> org.apache.tinkerpop.gremlin.structure.Vertex>) with arguments 
> [org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal <A 
> extends java.lang.Object, B extends java.lang.Object>]
>  @ line 1, column 1.
>    
> g.addV().as("first").repeat(__.addE("next").to(__.addV()).inV()).times(5).addE("next").to(__.select("first"))
>    ^
> 1 error
> {code}
> In my knowledge, the reason is that static type checking will verify the 
> class type of parameter, and the definition in `GraphTraversal` seems too 
> strict for `SimpleSandboxExtension`.
> As I changed the method definition:
> {code:bash}
> -    public default GraphTraversal<S, E> to(final Traversal<?, Vertex> 
> toVertex) {
> +    public default GraphTraversal<S, E> to(final Traversal<?, ?> toVertex) {
> {code}
> The mentioned case passed.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to