Findbugs all over #2

Mostly char encoding
Use StringWriter rather than OSW->BAOS->String
This commit is contained in:
zzz
2015-07-12 16:06:49 +00:00
parent 914cc120ad
commit 1f9bb046f5
25 changed files with 76 additions and 68 deletions

View File

@ -25,6 +25,7 @@ import java.util.List;
import java.util.Map;
import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
/**
* Holds different types that a bencoded byte array can represent.
@ -208,7 +209,7 @@ public class BEValue
} else if (bin) {
buf.append(bs.length).append(" bytes: ").append(Base64.encode(bs));
} else {
buf.append('"').append(new String(bs)).append('"');
buf.append('"').append(DataHelper.getUTF8(bs)).append('"');
}
valueString = buf.toString();
} else