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:
@ -1,20 +1,19 @@
|
||||
package net.i2p.router.web;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
|
||||
public class ConfigPeerHelper extends HelperBase {
|
||||
public ConfigPeerHelper() {}
|
||||
|
||||
public String getBlocklistSummary() {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(4*1024);
|
||||
StringWriter sw = new StringWriter(4*1024);
|
||||
try {
|
||||
_context.blocklist().renderStatusHTML(new OutputStreamWriter(baos));
|
||||
_context.blocklist().renderStatusHTML(sw);
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
return new String(baos.toByteArray());
|
||||
return sw.toString();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user