aws / aws/aws-lambda-snapstart-java-rules

Rules do not scan dependency injection without a handler

Đang mở
#35 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
53
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Problem: You can run standard Spring Boot applications via the [Serverless Java Container](https://github.com/aws/serverless-java-container) or the [Lambda Web Adapter.](https://github.com/awslabs/aws-lambda-web-adapter) In that case, no specific handler interface needs to be implemented. Currently the SnapStart rules would therefore not recognize any violation of the rules:

```java
public class UnicornControllerHandler {

private final UnicornService unicornService;
private final UUID uuid;
private static final Logger logger = LoggerFactory.getLogger(UnicornControllerHandler.class);

public UnicornControllerHandler(UnicornService unicornService) {
this.unicornService = unicornService;
uuid = UUID.randomUUID();
}
}

```

This is somehow related to https://github.com/aws/aws-lambda-snapstart-java-rules/issues/24 but the checks seem to only apply when the class and the method have a specific name.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.