private Validator createValidator(Schema schema){
  Stack stack=(Stack)validatorHandlerCache.get(schema);
  if (stack == null) {
    stack=new Stack();
    validatorHandlerCache.put(schema,stack);
  }
  if (stack.empty())   return schema.createValidator(properties);
  return (Validator)stack.pop();
}

private Validator createValidator ( Schema schema ) { Stack stack = ( Stack ) validatorHandlerCache . get ( schema ) ; if ( stack == null ) { stack = new Stack ( ) ; validatorHandlerCache . put ( schema , stack ) ; } if ( stack . empty ( ) ) return schema . createValidator ( properties ) ; return ( Validator ) stack . pop ( ) ; }
get a validator for a schema . if we already have a validator for this schema available in cache then we will use it and remove it from cache . at the end it will be added back to the cache through releasevalidator .
