From 440f14c39d4d032524569e6ba54e84860c034074 Mon Sep 17 00:00:00 2001 From: Nikola-Mircic Date: Sun, 24 Dec 2023 19:47:12 +0100 Subject: [PATCH] Code cleanup --- src/efakturaplus/App.java | 1 + src/efakturaplus/gui/InvoiceList.java | 2 -- src/efakturaplus/gui/InvoicePanel.java | 2 -- src/efakturaplus/gui/KeyPanel.java | 1 - src/efakturaplus/util/QRUtil.java | 10 +++------- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/efakturaplus/App.java b/src/efakturaplus/App.java index fe460ee..8a839c6 100644 --- a/src/efakturaplus/App.java +++ b/src/efakturaplus/App.java @@ -5,6 +5,7 @@ public class App { public static void main(String[] args) { + @SuppressWarnings("unused") Window w = new Window(); } diff --git a/src/efakturaplus/gui/InvoiceList.java b/src/efakturaplus/gui/InvoiceList.java index 193d684..601afad 100644 --- a/src/efakturaplus/gui/InvoiceList.java +++ b/src/efakturaplus/gui/InvoiceList.java @@ -18,7 +18,6 @@ import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; -import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; @@ -27,7 +26,6 @@ import javax.swing.border.Border; import efakturaplus.models.Invoice; -import efakturaplus.models.InvoiceStatus; import efakturaplus.models.InvoiceType; import efakturaplus.util.EFakturaUtil; import efakturaplus.util.PrintColor; diff --git a/src/efakturaplus/gui/InvoicePanel.java b/src/efakturaplus/gui/InvoicePanel.java index 7bbe0bc..48166ae 100644 --- a/src/efakturaplus/gui/InvoicePanel.java +++ b/src/efakturaplus/gui/InvoicePanel.java @@ -1,7 +1,5 @@ package efakturaplus.gui; -import java.awt.LayoutManager; - import javax.swing.JPanel; public class InvoicePanel extends JPanel { diff --git a/src/efakturaplus/gui/KeyPanel.java b/src/efakturaplus/gui/KeyPanel.java index 62854cc..e3bd86f 100644 --- a/src/efakturaplus/gui/KeyPanel.java +++ b/src/efakturaplus/gui/KeyPanel.java @@ -4,7 +4,6 @@ import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.io.File; import javax.swing.BorderFactory; import javax.swing.JLabel; diff --git a/src/efakturaplus/util/QRUtil.java b/src/efakturaplus/util/QRUtil.java index dc1a009..cc1ed59 100644 --- a/src/efakturaplus/util/QRUtil.java +++ b/src/efakturaplus/util/QRUtil.java @@ -1,29 +1,23 @@ package efakturaplus.util; -import java.awt.Image; + import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import java.net.http.HttpRequest.BodyPublisher; import java.net.http.HttpRequest.BodyPublishers; -import java.nio.ByteBuffer; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; import java.util.Base64; -import java.util.Locale; -import java.util.concurrent.Flow.Subscriber; import javax.imageio.ImageIO; import org.json.JSONObject; -import ch.randelshofer.util.ArrayUtil; import efakturaplus.models.Invoice; public class QRUtil { @@ -112,6 +106,8 @@ private String invoiceToString(Invoice inv) { } ro+=inv.paymentId; + + s.add(ro); } return String.join("|", s);