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

Rules do not scan dependency injection without a handler

Abierto
#35 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
53
Forks
10
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.