Skip to content

Commit 7689fa9

Browse files
committed
Cleanup code
1 parent 85f83bf commit 7689fa9

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ tasks.named<Jar>("jar") {
148148
"Implementation-Version" to project.version,
149149
"Revision" to gitHash.get(),
150150
"Build-Date" to buildDate,
151-
"Class-Path" to (configurations.runtimeClasspath.get() - configurations["provided"] + files("swt.jar")).map { it.name }.joinToString(" ")
151+
"Class-Path" to (configurations.runtimeClasspath.get() - configurations["provided"] + files("swt.jar")).joinToString(" ") { it.name }
152152
)
153153
}
154154
}

src/io/calimero/gui/BaseTabLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private void addListItems()
544544
list.setRedraw(false);
545545
int added = 0;
546546
while (itemBuffer.size() > 0 && added < 500) {
547-
final Object[][] e = itemBuffer.remove(0);
547+
final Object[][] e = itemBuffer.removeFirst();
548548
final String[] itemText = (String[]) e[0];
549549
final String[] keys = (String[]) e[1];
550550
final Object[] data = e[2];

src/io/calimero/gui/LogTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ private static void addToLogBuffer(final String name, final Level level, final S
337337
private static void addToLogHistory(final LogEntry entry) {
338338
synchronized (logHistory) {
339339
if (logHistory.size() >= maxHistorySize)
340-
logHistory.remove(0);
340+
logHistory.removeFirst();
341341
logHistory.add(entry);
342342
}
343343
}

src/io/calimero/gui/MemoryEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ protected void onCompletion(final Exception thrown, final boolean canceled) {
543543
confirmedRestart.run();
544544
if (tryBasicRestart.get()) {
545545
asyncAddLog("resort to basic restart");
546-
args.remove(args.size() - 1);
546+
args.removeLast();
547547
final var basicRestart = new RestartTool(args.toArray(String[]::new));
548548
basicRestart.run();
549549
}

src/io/calimero/gui/ProjectTab.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) 2019, 2024 B. Malinowsky
3+
Copyright (c) 2019, 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
@@ -76,7 +76,7 @@ static void findProjects() {
7676
if (projects.size() != 1)
7777
return;
7878

79-
importDatapoints(projects.get(0));
79+
importDatapoints(projects.getFirst());
8080
}
8181
catch (final IOException | KNXFormatException | RuntimeException e) {
8282
System.out.println("Error during lookup of KNX projects: " + e);

src/io/calimero/gui/PropertyEditorTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ protected void runCommand(final String... cmd) throws InterruptedException {
10361036
synchronized (commands) {
10371037
while (commands.isEmpty())
10381038
commands.wait();
1039-
command = commands.remove(0);
1039+
command = commands.removeFirst();
10401040
}
10411041
asyncAddLog(String.join(" ", command));
10421042
try {

0 commit comments

Comments
 (0)