From 12403e241e5ce99836d7687e3dadcccb2afadb89 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 6 Sep 2018 21:55:16 -0400 Subject: java: fix char conversions --- java/src/main/java/org/pablotron/luigi/Filter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/src/main/java/org/pablotron/luigi/Filter.java b/java/src/main/java/org/pablotron/luigi/Filter.java index 676c328..051ce78 100644 --- a/java/src/main/java/org/pablotron/luigi/Filter.java +++ b/java/src/main/java/org/pablotron/luigi/Filter.java @@ -90,8 +90,7 @@ public final class Filter { if (b < 32 || b > 126) { r.append(String.format("&#%d;", toUInt(b))); } else { - final byte bs[] = {b}; - r.append(new String(bs)); + r.append((char) b); } } } @@ -176,8 +175,7 @@ public final class Filter { case '.': case '~': // unreserved character - final byte bs[] = {b}; - r.append(new String(bs)); + r.append((char) b); break; case ' ': r.append("+"); -- cgit v1.2.3