From 77078785b29a5e5f815fc900c8a58569abde1c0e Mon Sep 17 00:00:00 2001 From: "Anosh D. Ullenius" Date: Sat, 20 Apr 2024 16:38:19 +0200 Subject: [PATCH] Minor refactoring --- README.md | 2 +- src/main/java/se/anosh/spctag/dao/SpcFileReader.java | 2 +- src/main/java/se/anosh/spctag/domain/Xid6.java | 2 +- src/test/java/se/anosh/spctag/util/Utf8ValidatorTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4aa5fb..48d30f4 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Noncharacters in utf-8 are disallowed for security reasons. Most of the existing tools are 15-20 year old legacy Windows programs that won't run on modern computers. The source code is lost. Or it was written in C/C++ for 32-bit architecture and won't compile on modern 64-bit computers. -Java is multi-platform and you can run and compile 20-year old Java programs without any issues. So I'd figure this would be a suitable platform for posterity. +Java is multi-platform and you can run and compile 20-year-old Java programs without any issues. So I'd figure this would be a suitable platform for posterity. Hopefully doing it in Java makes it easy to convert to XML and JSON, as well as persisting it in databases using SQL. diff --git a/src/main/java/se/anosh/spctag/dao/SpcFileReader.java b/src/main/java/se/anosh/spctag/dao/SpcFileReader.java index 94199da..94eb3c3 100644 --- a/src/main/java/se/anosh/spctag/dao/SpcFileReader.java +++ b/src/main/java/se/anosh/spctag/dao/SpcFileReader.java @@ -227,7 +227,7 @@ private boolean containsID666Tags() throws IOException { */ private boolean hasBinaryTagFormat() throws IOException { final char first = parse(Id666.Field.ARTIST_OF_SONG_BINARY_FORMAT, - (bytes) -> new String(bytes, StandardCharsets.UTF_8)) // FIXME re-write algorithm + (bytes) -> new String(bytes, StandardCharsets.UTF_8)) // TODO re-write algorithm .charAt(0); // If 0xB0 is *NOT* a valid char or *IS* a digit then don't allow it. // Sometimes we have valid digits in this offset (if the tag-format is text) diff --git a/src/main/java/se/anosh/spctag/domain/Xid6.java b/src/main/java/se/anosh/spctag/domain/Xid6.java index 085e9cf..ffcd614 100644 --- a/src/main/java/se/anosh/spctag/domain/Xid6.java +++ b/src/main/java/se/anosh/spctag/domain/Xid6.java @@ -149,7 +149,7 @@ public Integer getEndLength() { } public void setEndLength(int endLength) { - this.endLength = (endLength); + this.endLength = endLength; } public Long getFadeLength() { diff --git a/src/test/java/se/anosh/spctag/util/Utf8ValidatorTest.java b/src/test/java/se/anosh/spctag/util/Utf8ValidatorTest.java index 52365f2..a488997 100644 --- a/src/test/java/se/anosh/spctag/util/Utf8ValidatorTest.java +++ b/src/test/java/se/anosh/spctag/util/Utf8ValidatorTest.java @@ -213,7 +213,7 @@ void validUtf8TestFile() throws IOException { @Test /* - * A contiguous range of 32 noncharacters: U+FDD0..U+FDEF in the BMP + * "A contiguous range of 32 noncharacters: U+FDD0..U+FDEF in the BMP" * https://www.unicode.org/faq/private_use.html#noncharacters * * Tests 32/66 noncharacter