Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1527

Do not override registered strategies in TraversalStrategies.GlobalCache

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.4
    • Component/s: process
    • Labels:
      None

      Description

      This may be a non-issue (need to check), but we currently do this in every Graph (and GraphComputer) class.

      static {
              TraversalStrategies.GlobalCache.registerStrategies(TinkerGraph.class, TraversalStrategies.GlobalCache.getStrategies(Graph.class).clone().addStrategies(TinkerGraphStepStrategy.instance()));
          }
      

      If this static code is loaded every time a Graph instance is created, then manually tweaked strategy registrations get overwritten. If this is the case, then we should do:

      static {
          TraversalStrategies.GlobalCache.registerStrategiesIfNotPresent(TinkerGraph.class,TraversalStrategies.GlobalCache.getStrategies(Graph.class).clone().addStrategies(TinkerGraphStepStrategy.instance()));
          }
      

      That is, add a registerIfNotPresent() method.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                okram Marko A. Rodriguez
                Reporter:
                okram Marko A. Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: