google / google/google-java-format
Found worker thread-leak
Abierto
- Lenguaje dominante
- Java
- Estrellas
- 6.2k
- Forks
- 937
- Merge medio
- 6 min
- PR fusionados (30 d)
- 3
Descripción
The formatter assumes that it is executed as a CLI, but it actually has a resource leak. I was trying to use it in a service, and the resource leak became apparent with more use. The issue is that Main.formatFiles creates an ExecutorService, but it doesn't shut it down. In addition it would be nice if a user could pass in their own ExecutorService whose lifecycle the user manages. That way, for every invocation of the formatter in a service context, a new ExecutorService need not be created/shutdown.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.