Skip to content

Commit 81a62f8

Browse files
committed
Don't warn about ignored exceptions
1 parent 0bcc1bc commit 81a62f8

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/io/calimero/gui/About.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class About {
119119
asg.setImage(img);
120120
}
121121
}
122-
catch (final IOException e) {}
122+
catch (final IOException ignore) {}
123123

124124
final SelectionAdapter openLink = new SelectionAdapter() {
125125
@Override

src/io/calimero/gui/BaosTab.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ protected void initTableBottom(final Composite parent, final Sash sash) {
318318
dpDpt.setData(s, new Object[] { main, sub });
319319
});
320320
}
321-
catch (final KNXException e) {}
321+
catch (final KNXException ignore) {}
322322
});
323323
dpDpt.addSelectionListener(adapt(e -> {
324324
final var dpt = selectedDpt();
@@ -613,7 +613,7 @@ private Spinner spinner(final int min, final int max, final String currentValue)
613613
try {
614614
spinner.setSelection(Integer.parseInt(currentValue));
615615
}
616-
catch (final NumberFormatException e) {}
616+
catch (final NumberFormatException ignore) {}
617617
final Supplier<String> formatter = () -> String.format("%02x", Integer.parseInt(spinner.getText()));
618618
spinner.setData(formatter);
619619
return spinner;
@@ -802,7 +802,7 @@ private static String ipAddress(final byte[] data) {
802802
try {
803803
return InetAddress.getByAddress(data).getHostAddress();
804804
}
805-
catch (final UnknownHostException e) {}
805+
catch (final UnknownHostException ignore) {}
806806
return "n/a";
807807
}
808808

src/io/calimero/gui/ConnectDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ConnectDialog {
9494
try {
9595
localhost = InetAddress.getLocalHost();
9696
}
97-
catch (final UnknownHostException uhe) {}
97+
catch (final UnknownHostException ignore) {}
9898

9999
final Text hostData;
100100
final Text localhostData;
@@ -390,7 +390,7 @@ private Protocol useRouting()
390390
return InetAddress.getByName(hostData.getText()).isMulticastAddress()
391391
? Protocol.Routing : Protocol.Tunneling;
392392
}
393-
catch (final UnknownHostException e) {}
393+
catch (final UnknownHostException ignore) {}
394394
return Protocol.Tunneling;
395395
}
396396
});

src/io/calimero/gui/DiscoverTab.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Calimero GUI - A graphical user interface for the Calimero 3 tools
3-
Copyright (c) 2006, 2024 B. Malinowsky
3+
Copyright (c) 2006, 2025 B. Malinowsky
44
55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -353,7 +353,7 @@ else if (supportsSearchResponseV2.contains(result.remoteEndpoint()))
353353
mcast = Optional.of(new InetSocketAddress(InetAddress.getByAddress(device.getMulticastAddress()),
354354
KNXnetIPConnection.DEFAULT_PORT));
355355
}
356-
catch (final UnknownHostException e) {}
356+
catch (final UnknownHostException ignore) {}
357357

358358
Map<ServiceFamily, Integer> secureServices = Map.of();
359359
String itemText = newItem;

src/io/calimero/gui/ProcCommTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public void widgetSelected(final org.eclipse.swt.events.SelectionEvent e)
277277
dpt.setData(s, new Object[] { main, sub });
278278
});
279279
}
280-
catch (final KNXException e) {}
280+
catch (final KNXException ignore) {}
281281
});
282282
dpt.addSelectionListener(new SelectionAdapter() {
283283
@Override

src/io/calimero/gui/PropertyEditorTab.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ private static String altFormatted(final String input, final String onError)
713713
.collect(toList());
714714
return altFormatted(values);
715715
}
716-
catch (final RuntimeException e) {}
716+
catch (final RuntimeException ignore) {}
717717
return onError;
718718
}
719719

@@ -723,7 +723,7 @@ private static String altFormatted(final List<byte[]> values, final String onErr
723723
final List<BigInteger> list = values.stream().map(v -> new BigInteger(1, v)).collect(toList());
724724
return altFormatted(list);
725725
}
726-
catch (final RuntimeException e) {}
726+
catch (final RuntimeException ignore) {}
727727
return onError;
728728
}
729729

0 commit comments

Comments
 (0)