Skip to content

Commit c669d4c

Browse files
committed
Use this. Prefix in Test Support Tests
Issue gh-745
1 parent a42a8da commit c669d4c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ public class EmbeddedLdapServerFactoryBeanTests {
3737

3838
@After
3939
public void setup() {
40-
if (ctx != null) {
41-
ctx.close();
40+
if (this.ctx != null) {
41+
this.ctx.close();
4242
}
4343
}
4444

4545
@Test
4646
public void testServerStartup() throws Exception {
47-
ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml");
48-
LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class);
47+
this.ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml");
48+
LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class);
4949
assertThat(ldapTemplate).isNotNull();
5050

5151
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),

test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ public class TestContextSourceFactoryBeanTests {
3737

3838
@After
3939
public void setup() {
40-
if (ctx != null) {
41-
ctx.close();
40+
if (this.ctx != null) {
41+
this.ctx.close();
4242
}
4343
}
4444

4545
@Test
4646
public void testServerStartup() throws Exception {
47-
ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml");
48-
LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class);
47+
this.ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml");
48+
LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class);
4949
assertThat(ldapTemplate).isNotNull();
5050

5151
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),

0 commit comments

Comments
 (0)