From 001d1d82829961526bb0e4b8e71ed3c4b64fba6f Mon Sep 17 00:00:00 2001 From: dougqh Date: Wed, 2 Oct 2019 14:39:20 -0400 Subject: [PATCH] codenarc --- .../springdata/Elasticsearch53SpringRepositoryTest.groovy | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dd-java-agent/instrumentation/elasticsearch/transport-5.3/src/test/groovy/springdata/Elasticsearch53SpringRepositoryTest.groovy b/dd-java-agent/instrumentation/elasticsearch/transport-5.3/src/test/groovy/springdata/Elasticsearch53SpringRepositoryTest.groovy index 2ee4b2170e..76239ab7bc 100644 --- a/dd-java-agent/instrumentation/elasticsearch/transport-5.3/src/test/groovy/springdata/Elasticsearch53SpringRepositoryTest.groovy +++ b/dd-java-agent/instrumentation/elasticsearch/transport-5.3/src/test/groovy/springdata/Elasticsearch53SpringRepositoryTest.groovy @@ -24,13 +24,15 @@ class Elasticsearch53SpringRepositoryTest extends AgentTestRunner { DocRepository repo = Proxy.newProxyInstance( getClass().getClassLoader(), [DocRepository] as Class[], - new LazyProxyInvoker()); + new LazyProxyInvoker()) static class LazyProxyInvoker implements InvocationHandler { - def repo; + def repo DocRepository getOrCreateRepository() { - if ( repo != null ) return repo; + if (repo != null) { + return repo + } TEST_WRITER.clear() runUnderTrace("setup") {