[rules-users] why define the returnedProcessor twice

scarlettxu xu_han_zi at 163.com
Thu Oct 17 05:37:14 EDT 2013


Hi Expert,

I am a new guy to drools rules and studying the drools camel server now.
And I see in the DroolsPolicy class located in project
drools-camel-5.2.0.Final , it define the returnedProcessor twice

  public Processor wrap(RouteContext routeContext, Processor processor)
  {
    RouteDefinition routeDef = routeContext.getRoute();

    ToDefinition toDrools = getDroolsNode(routeDef);
*    Processor returnedProcessor;
    Processor returnedProcessor;*
    if (toDrools != null) {
      returnedProcessor = new DroolsProcess(toDrools.getUri(), processor);
    }
    else {
      returnedProcessor = processor;
    }
    return returnedProcessor;
  }

I wonder is it for special purpose ?
As I checked from version 5.2.0 Final to 6.0.0RC3



--
View this message in context: http://drools.46999.n3.nabble.com/why-define-the-returnedProcessor-twice-tp4026406.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list