Skip to content

Commit

Permalink
Replace call to String.isBlank for Java 8 compliance in running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Oct 27, 2023
1 parent 1bcb594 commit 0855201
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/games/stendhal/server/core/engine/Translate.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ private static void init(String language) {
while (line != null) {
lidx++;

// ignore empty lines & comments
if (line.isBlank() || line.startsWith("#")) {
// ignore empty lines & comments (because this code is executed during testing we cannot use `String.isBlank`
// from Java 11)
if ("".equals(line.replaceAll("\t| ", "")) || line.startsWith("#")) {
line = reader.readLine();
continue;
}
Expand Down

0 comments on commit 0855201

Please sign in to comment.