From e826d71efc29fac6ab7ad58f73eb4266e7a1c919 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sat, 20 Aug 2022 20:03:02 -0500 Subject: [PATCH] Restructure thread function. Co-authored-by: sigonasr2 --- ArcadeReader.java | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ArcadeReader.java b/ArcadeReader.java index 5972ab1..d602abc 100644 --- a/ArcadeReader.java +++ b/ArcadeReader.java @@ -693,13 +693,13 @@ public class ArcadeReader { .replaceAll(Pattern.quote("="),""); } public static void submitToDatabase(Path p) { - //First we read and interpret what this image is. - BufferedImage img; - try { - img = ImageIO.read(p.toFile()); - final Reader newImg = interpret(img); - Thread t = new Thread(){ - public void run() { + Thread t = new Thread(){ + public void run() { + //First we read and interpret what this image is. + BufferedImage img; + try { + img = ImageIO.read(p.toFile()); + final Reader newImg = interpret(img); newImg.result_screenshot=p; //Path getGamePath = gamePath(newImg); newImg.interpretBoxes(p); @@ -763,11 +763,12 @@ public class ArcadeReader { } catch (IOException e) { e.printStackTrace(); } + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); } - }; - t.start(); - } catch (IOException e) { - e.printStackTrace(); - } + } + }; + t.start(); } }