forked from I2P_Developers/i2p.i2p
Findbugs all over #2
Mostly char encoding Use StringWriter rather than OSW->BAOS->String
This commit is contained in:
@ -94,7 +94,7 @@ public class SAMReader {
|
||||
_log.error("Error reading from SAM", ioe);
|
||||
}
|
||||
|
||||
String line = new String(baos.toByteArray());
|
||||
String line = DataHelper.getUTF8(baos.toByteArray());
|
||||
baos.reset();
|
||||
|
||||
if (line == null) {
|
||||
|
@ -180,7 +180,7 @@ public class SAMStreamSend {
|
||||
byte dest[] = new byte[1024];
|
||||
int read = DataHelper.read(fin, dest);
|
||||
|
||||
_remoteDestination = new String(dest, 0, read);
|
||||
_remoteDestination = DataHelper.getUTF8(dest, 0, read);
|
||||
synchronized (_remotePeers) {
|
||||
_connectionId = _remotePeers.size() + 1;
|
||||
_remotePeers.put(Integer.valueOf(_connectionId), Sender.this);
|
||||
|
Reference in New Issue
Block a user