refactor: simplify while loop logic
- Replace `removeFirst()` check with `isEmpty()` for cleaner loop condition. - Improve code readability and maintainability. Signed-off-by: Minecon724 <git@m724.eu>
This commit is contained in:
parent
8e4fae069d
commit
0a6d8c09c5
1 changed files with 2 additions and 2 deletions
|
@ -60,8 +60,8 @@ public record Post(
|
|||
|
||||
var properties = new HashMap<String, String>();
|
||||
|
||||
String line;
|
||||
while ((line = lines.removeFirst()) != null) {
|
||||
while (!lines.isEmpty()) {
|
||||
var line = lines.removeFirst();
|
||||
var parts = line.split(" ");
|
||||
|
||||
var key = parts[0].toLowerCase();
|
||||
|
|
Loading…
Add table
Reference in a new issue