Syntax error in file High

Syntax errors were detected in some files.

Detector ID
java/file-syntax-error@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-

Noncompliant example

1public void getObjectContentNoncompliant(AmazonS3 amazonS3Client, String bucketName, String key) throws IOException {
2    final S3Object s3object = amazonS3Client.getObject(bucketName, key);
3    // Noncompliant: the statement is incomplete and is missing ";" at the end.
4    System.out.println(s3object.getObjectMetadata())
5    InputStream reportStream = s3object.getObjectContent();
6    IOUtils.toString(reportStream);
7}

Compliant example

1public void getObjectContentCompliant(AmazonS3 amazonS3Client, String bucketName, String key) throws IOException {
2    final S3Object s3object = amazonS3Client.getObject(bucketName, key);
3    // Compliant: the statement is complete and ends with a ";".
4    System.out.println(s3object.getObjectMetadata());
5    InputStream reportStream = s3object.getObjectContent();
6    IOUtils.toString(reportStream);
7}