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

Rules do not scan dependency injection without a handler

未关闭
#35 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
53
派生
10
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。