android: Cleanup classes
- Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
4986d92f3d
commit
4671f59c67
@@ -58,7 +58,7 @@ public final class ToolsInstaller {
|
||||
|
||||
public CompletionStage<String> getVersion() {
|
||||
return Application.getComponent().getAsyncWorker().supplyAsync(() -> {
|
||||
final ArrayList<String> output = new ArrayList<>();
|
||||
final List<String> output = new ArrayList<>();
|
||||
if (rootShell.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
|
||||
throw new RuntimeException("Unable to determine kernel module version");
|
||||
return output.get(0);
|
||||
|
||||
Reference in New Issue
Block a user