Skip to content

Commit

Permalink
Test case for #5739
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Mar 30, 2023
1 parent 342041f commit 30a968e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions checker/tests/resourceleak/ConnectingSockets2.java
@@ -0,0 +1,18 @@
// Test case for https://github.com/typetools/checker-framework/issues/5739 .

// @skip-test until the bug is fixed

import java.io.IOException;
import java.net.*;

class ConnectingSockets2 {

void run(InetSocketAddress isa) {
try (Socket serverSocket = new Socket()) {
serverSocket.close();
serverSocket.connect(isa);
} catch (IOException e) {
// do nothing
}
}
}

0 comments on commit 30a968e

Please sign in to comment.