for (int i = 0; i < strategies.length && !exists; i++) {
exists = strategies[i] instanceof GrailsPlaceholderResolverStrategy;
}
if (!exists) {
aux.add(new GrailsPlaceholderResolverStrategy());
}
aux.addAll(Arrays.asList(strategies));
strategies = aux.toArray(new ObjectMarshallingStrategy[aux.size()]);
} else {
strategies = new ObjectMarshallingStrategy[] {
new GrailsPlaceholderResolverStrategy(),
MarshallerFactory.newSerializeMarshallingStrategy() };
}
this.env.set(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES, strategies);
return strategies;
}