github-advanced-security[bot] commented on code in PR #826:
URL:
https://github.com/apache/incubator-baremaps/pull/826#discussion_r1451818063
##########
baremaps-server/src/main/java/org/apache/baremaps/server/ChangeResource.java:
##########
@@ -56,40 +49,30 @@
private final Path style;
- private final SseBroadcaster sseBroadcaster;
-
- private final OutboundSseEvent.Builder sseEventBuilder;
+ private final Sinks.Many<ServerSentEvent> changes =
Sinks.many().multicast().directBestEffort();
/**
* Constructs a {@code ChangeResource}.
*
* @param tileset the path to the tileset
* @param style the path to the style
- * @param sse the server-sent events
*/
- @Inject
- public ChangeResource(
- @Named("tileset") @Optional Path tileset,
- @Named("style") @Optional Path style,
- Sse sse) {
+ public ChangeResource(Path tileset, Path style) {
this.tileset = tileset;
this.style = style;
- this.sseBroadcaster = sse.newBroadcaster();
- this.sseEventBuilder = sse.newEventBuilder();
- var changeListener = new ChangeListener();
- new Thread(changeListener).start();
+ new Thread(new ChangeListener()).start();
Review Comment:
## Start of thread in constructor
Class [ChangeResource](1) starts a thread in its constructor.
[Show more
details](https://github.com/apache/incubator-baremaps/security/code-scanning/906)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]