From f182e25dfef360df9c634cc3d10c0ada76eb9cde Mon Sep 17 00:00:00 2001 From: Kevin Ge Date: Mon, 18 Sep 2023 11:44:36 -0400 Subject: [PATCH] rename + spotless --- .../coralservice/controller/VisualizationController.java | 4 ++-- .../linkedin/coral/coralservice/utils/VisualizationUtils.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coral-service/src/main/java/com/linkedin/coral/coralservice/controller/VisualizationController.java b/coral-service/src/main/java/com/linkedin/coral/coralservice/controller/VisualizationController.java index 2088210f4..3569434cc 100644 --- a/coral-service/src/main/java/com/linkedin/coral/coralservice/controller/VisualizationController.java +++ b/coral-service/src/main/java/com/linkedin/coral/coralservice/controller/VisualizationController.java @@ -5,7 +5,6 @@ */ package com.linkedin.coral.coralservice.controller; -import com.linkedin.coral.coralservice.utils.VisualizationUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -27,6 +26,7 @@ import com.linkedin.coral.coralservice.entity.VisualizationRequestBody; import com.linkedin.coral.coralservice.entity.VisualizationResponseBody; import com.linkedin.coral.coralservice.utils.RewriteType; +import com.linkedin.coral.coralservice.utils.VisualizationUtils; import static com.linkedin.coral.coralservice.utils.VisualizationUtils.*; @@ -34,7 +34,7 @@ @RestController @RequestMapping("/api/visualizations") public class VisualizationController { - private File imageDir = createImageDir(); + private File imageDir = getImageDir(); private VisualizationUtils visualizationUtils = new VisualizationUtils(); @PostMapping("/generategraphs") diff --git a/coral-service/src/main/java/com/linkedin/coral/coralservice/utils/VisualizationUtils.java b/coral-service/src/main/java/com/linkedin/coral/coralservice/utils/VisualizationUtils.java index 088ca08c2..db12766b6 100644 --- a/coral-service/src/main/java/com/linkedin/coral/coralservice/utils/VisualizationUtils.java +++ b/coral-service/src/main/java/com/linkedin/coral/coralservice/utils/VisualizationUtils.java @@ -23,7 +23,7 @@ public class VisualizationUtils { - public static File createImageDir() { + public static File getImageDir() { return new File(System.getProperty("java.io.tmpdir") + "/images" + UUID.randomUUID()); }