Skip to content

Commit 3f715cd

Browse files
committed
Fix warnings in ScramSha1SaslAuthenticatorTest
1 parent b031f9c commit 3f715cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

driver-core/src/test/unit/com/mongodb/connection/ScramSha1SaslAuthenticatorTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
public class ScramSha1SaslAuthenticatorTest {
3535
private TestInternalConnection connection;
36-
private MongoCredential credential;
3736
private ScramSha1Authenticator subject;
3837
private ConnectionDescription connectionDescription;
3938

@@ -42,14 +41,15 @@ public void before() {
4241
this.connection = new TestInternalConnection(new ServerId(new ClusterId(), new ServerAddress("localhost", 27017)));
4342
connectionDescription = new ConnectionDescription(new ServerId(new ClusterId(), new ServerAddress()));
4443
// User name contains ",' and '=" to test user name prepping required by the RFC
45-
this.credential = MongoCredential.createScramSha1Credential("u,ser=", "database", "pencil".toCharArray());
44+
MongoCredential credential = MongoCredential.createScramSha1Credential("u,ser=", "database",
45+
"pencil".toCharArray());
4646
ScramSha1Authenticator.RandomStringGenerator randomStringGenerator = new ScramSha1Authenticator.RandomStringGenerator() {
4747
@Override
4848
public String generate(final int length) {
4949
return "fyko+d2lbbFgONRv9qkxdawL";
5050
}
5151
};
52-
this.subject = new ScramSha1Authenticator(this.credential, randomStringGenerator);
52+
this.subject = new ScramSha1Authenticator(credential, randomStringGenerator);
5353
}
5454

5555
@Test
@@ -65,7 +65,7 @@ public void testAuthenticateThrowsWhenServerProvidesAnInvalidRValue() {
6565
}
6666

6767
@Test
68-
public void testAuthenticateThrowsWhenServerProvidesAnInvalidRValueAsync() throws InterruptedException {
68+
public void testAuthenticateThrowsWhenServerProvidesAnInvalidRValueAsync() {
6969
enqueueInvalidRValueReply();
7070

7171
try {
@@ -103,7 +103,7 @@ public void testAuthenticateThrowsWhenServerProvidesInvalidServerSignature() {
103103
}
104104

105105
@Test
106-
public void testAuthenticateThrowsWhenServerProvidesInvalidServerSignatureAsync() throws InterruptedException {
106+
public void testAuthenticateThrowsWhenServerProvidesInvalidServerSignatureAsync() {
107107
enqueueInvalidServerSignature();
108108

109109
try {

0 commit comments

Comments
 (0)