This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch armeria
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git

commit b3d05141337c94056977e0d57e1712d5e232eccf
Author: Bertil Chapuis <[email protected]>
AuthorDate: Tue Jan 16 13:49:07 2024 +0100

    Format code and fix warning
---
 .../java/org/apache/baremaps/workflow/tasks/DecompressFile.java   | 8 +++-----
 .../src/main/java/org/apache/baremaps/server/ChangeResource.java  | 7 +++++--
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java
index 2948e061..449891ce 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java
@@ -25,8 +25,6 @@ import java.nio.file.StandardOpenOption;
 import java.util.StringJoiner;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.ZipFile;
-
-import org.apache.baremaps.utils.FileUtils;
 import org.apache.baremaps.workflow.Task;
 import org.apache.baremaps.workflow.WorkflowContext;
 import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
@@ -198,10 +196,10 @@ public class DecompressFile implements Task {
           Files.createDirectories(path);
         } else {
           Files.write(path, new byte[] {},
-                  StandardOpenOption.CREATE,
-                  StandardOpenOption.TRUNCATE_EXISTING);
+              StandardOpenOption.CREATE,
+              StandardOpenOption.TRUNCATE_EXISTING);
           try (var input = new 
BufferedInputStream(zipFile.getInputStream(entry));
-               var output = new BufferedOutputStream(new 
FileOutputStream(path.toFile()))) {
+              var output = new BufferedOutputStream(new 
FileOutputStream(path.toFile()))) {
             input.transferTo(output);
           }
         }
diff --git 
a/baremaps-server/src/main/java/org/apache/baremaps/server/ChangeResource.java 
b/baremaps-server/src/main/java/org/apache/baremaps/server/ChangeResource.java
index ebd80eee..32ccae71 100644
--- 
a/baremaps-server/src/main/java/org/apache/baremaps/server/ChangeResource.java
+++ 
b/baremaps-server/src/main/java/org/apache/baremaps/server/ChangeResource.java
@@ -37,7 +37,7 @@ import reactor.core.publisher.Sinks;
 /**
  * A resource that provides the changes in the tileset and style.
  */
-public class ChangeResource {
+public final class ChangeResource {
 
   private static final Logger logger = 
LoggerFactory.getLogger(ChangeResource.class);
 
@@ -49,6 +49,8 @@ public class ChangeResource {
 
   private final Path style;
 
+  private final Thread thread;
+
   private final Sinks.Many<ServerSentEvent> changes = 
Sinks.many().multicast().directBestEffort();
 
   /**
@@ -60,7 +62,8 @@ public class ChangeResource {
   public ChangeResource(Path tileset, Path style) {
     this.tileset = tileset;
     this.style = style;
-    new Thread(new ChangeListener()).start();
+    this.thread = new Thread(new ChangeListener());
+    this.thread.start();
   }
 
   /**

Reply via email to