public void branchingNoncompliant()

in src/java/detectors/aws_parse_error_message/AwsParseErrorMessage.java [17:29]


    public void branchingNoncompliant() {
        AmazonS3 s3Client = AmazonS3ClientBuilder.standard().withRegion(Regions.US_EAST_1).build();
        try {
            s3Client.doesObjectExist("bucketName", "key");
        } catch (AmazonServiceException e) {
            // Noncompliant: checks the status message of the exception instead of the status code.
            if (e.getMessage().contains("bucketName")) {
                log.info("one thing");
            } else {
                log.info("another thinking");
            }
        }
    }