mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-31 19:40:38 +00:00
Use var instead of explicit types
This commit is contained in:
parent
03c30519b1
commit
de273586b4
77 changed files with 850 additions and 1017 deletions
|
@ -12,8 +12,8 @@ public class IOUtils {
|
|||
}
|
||||
|
||||
public static String readAll(InputStream in, Charset charset) throws IOException {
|
||||
StringWriter output = new StringWriter();
|
||||
byte[] buffer = new byte[4096];
|
||||
var output = new StringWriter();
|
||||
var buffer = new byte[4096];
|
||||
int n;
|
||||
while (-1 != (n = in.read(buffer))) {
|
||||
output.write(new String(buffer, 0, n, charset));
|
||||
|
@ -22,7 +22,7 @@ public class IOUtils {
|
|||
}
|
||||
|
||||
public static File getDataHomeDir() {
|
||||
String dataHome = System.getenv("XDG_DATA_HOME");
|
||||
var dataHome = System.getenv("XDG_DATA_HOME");
|
||||
if (dataHome != null) {
|
||||
return new File(dataHome);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue