Skip to content

Commit d1d2ceb

Browse files
authored
Ensure constructor is a constructor (#72)
1 parent 29389b2 commit d1d2ceb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/java/detectors/lambda_client_reuse/LambdaClientReuseCompliant.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
public class LambdaClientReuseCompliant implements RequestHandler<String, Void> {
1717

1818
private AmazonS3 s3Client;
19-
20-
public void S3ClientCreatedCompliant() {
19+
20+
public LambdaClientReuseCompliant() {
21+
// Compliant: creates the client only once.
2122
this.s3Client = AmazonS3ClientBuilder.standard()
2223
.withRegion(Regions.US_EAST_1).build();
2324
}

0 commit comments

Comments
 (0)