Skip to content

Missing rules when using java.time.Local* classes #36

Closed

Description

@Vadym79

When using envCreationTime = System.currentTimeMillis(); invocation in the constructor of the Lambda function
I get the finding of type AWS_LAMBDA_SNAP_START_BUG in the category CORRECTNESS.
But I didn't get the same finding invoking one of the following in the consturctor instead:

currentDateTime = LocalDateTime.now(); currentDate = LocalDate.now(); currentTime = LocalTime.now(); currentZonedDateTime = ZonedDateTime.now();

I totally understand that using System.currentTimeMillis() is the simplest way to get the current time in millis , but using java.time.Local* abstractions also belongs the standard sicne Java 8.

Activity

  1. tobixlea commented on Dec 9, 2025

    @tobixlea
    Contributor

    Thank you for bringing up this issue to us. We have updated the rules to include using jave.time.Local*. The PR for this change can be found here

  2. tobixlea commented on Dec 9, 2025

    @tobixlea
    Contributor

    Marking issue as resolved and closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions