From c669d4c4f9f6b54bb62c16421e6f968d47426f8f Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Tue, 9 May 2023 17:40:07 -0600 Subject: [PATCH] Use this. Prefix in Test Support Tests Issue gh-745 --- .../unboundid/EmbeddedLdapServerFactoryBeanTests.java | 8 ++++---- .../test/unboundid/TestContextSourceFactoryBeanTests.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java b/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java index c5501a84..d938fac5 100644 --- a/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java +++ b/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java @@ -37,15 +37,15 @@ public class EmbeddedLdapServerFactoryBeanTests { @After public void setup() { - if (ctx != null) { - ctx.close(); + if (this.ctx != null) { + this.ctx.close(); } } @Test public void testServerStartup() throws Exception { - ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml"); - LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class); + this.ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml"); + LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class); assertThat(ldapTemplate).isNotNull(); List list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"), diff --git a/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java b/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java index c81cc578..cc643360 100644 --- a/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java +++ b/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java @@ -37,15 +37,15 @@ public class TestContextSourceFactoryBeanTests { @After public void setup() { - if (ctx != null) { - ctx.close(); + if (this.ctx != null) { + this.ctx.close(); } } @Test public void testServerStartup() throws Exception { - ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml"); - LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class); + this.ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml"); + LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class); assertThat(ldapTemplate).isNotNull(); List list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),