From 8e01f22ab0e3089fee1107f82e96e07b18439359 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Sun, 10 Dec 2023 22:02:29 +0100 Subject: [PATCH] shorten subject to max of 90 chars. close #1769 --- .../jdimension/jlawyer/client/bea/BeaMessageContentUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/bea/BeaMessageContentUI.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/bea/BeaMessageContentUI.java index 78187c39e..b96e60f65 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/bea/BeaMessageContentUI.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/bea/BeaMessageContentUI.java @@ -864,7 +864,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent lblSentDate.setText(df2.format(msg.getReceptionTime())); } String shortened=msg.getSubject(); - shortened=shortened.substring(0,Math.min(150, shortened.length())); + shortened=shortened.substring(0,Math.min(90, shortened.length())); lblSubject.setText(shortened); lblSubject.setToolTipText(msg.getSubject()); lblFrom.setText(msg.getSenderName()); @@ -879,7 +879,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent } String to = ""; - if (msg.getRecipients().size() > 0) { + if (!msg.getRecipients().isEmpty()) { to = msg.getRecipients().get(0).getName(); for (int i = 1; i < msg.getRecipients().size(); i++) { to = to + ", " + msg.getRecipients().get(i).getName(); @@ -920,7 +920,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent processCardTable.setModel(tm2); tabs.setIconAt(2, null); if (msg.getProcessCard() != null) { - if (msg.getProcessCard().getEntries().size() > 0 || !StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) { + if (!msg.getProcessCard().getEntries().isEmpty() || !StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) { tabs.setIconAt(2, new javax.swing.ImageIcon(BeaMessageContentUI.class.getResource("/icons/messagebox_warning.png"))); } if(!StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) {