aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-06 21:55:16 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-06 21:55:16 -0400
commit12403e241e5ce99836d7687e3dadcccb2afadb89 (patch)
tree916d6ad62b6cbb12c571b08cd4197d886f6f941e /java
parent5ce3f22d0a7ebb349bf6552d9edd3bb13ad1de2e (diff)
downloadluigi-template-12403e241e5ce99836d7687e3dadcccb2afadb89.tar.bz2
luigi-template-12403e241e5ce99836d7687e3dadcccb2afadb89.zip
java: fix char conversions
Diffstat (limited to 'java')
-rw-r--r--java/src/main/java/org/pablotron/luigi/Filter.java6
1 files 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("+");