Skip to content

Commit

Permalink
Minor type cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cover jdcove2 committed Nov 4, 2024
1 parent 5201952 commit 8d24863
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/emissary/core/IBaseDataObjectXmlCodecs.java
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,10 @@ public static boolean requiresEncoding(final byte[] utf8Bytes) {
// https://stackoverflow.com/questions/3770117/what-is-the-range-of-unicode-printable-characters
public static boolean requiresEncoding(final Reader reader) throws IOException {
try (BufferedReader bufferedReader = new BufferedReader(reader)) {
int c;
while ((c = bufferedReader.read()) >= 0) {
int i;
while ((i = bufferedReader.read()) != -1) {
final char c = (char) i;

if (('\u0000' <= c && c <= '\u0008') ||
('\u000E' <= c && c <= '\u001F') ||
('\u007F' <= c && c <= '\u009F') ||
Expand Down

0 comments on commit 8d24863

Please sign in to comment.